Hello,
I've tried everything and it seems i am missing something critical. I can't get my if statement to work properly in an automation.
I am using a For each branch where i set the smart value to
{{lookupIssues.assignee.distinct}}
I have been told that distinct only returns a string and not an object, in this case the string would be the accountId.
Then, i have a Send Email action. In the body content, i am using this and the If never matches :
{{#lookupIssues}}
{{#if(equals(assignee, fields.assignee.accountId))}}
[{{key}}|{{url}}] - {{fields.summary}}
{{/}}
{{/}}
At some point i realized that i can actually consider assignee as an object and assignee.emailAddress does work. But even then, when i use this statement :
{{#if(equals(assignee.emailAddress, fields.assignee.emailAddress))}}, it never matches while it should. Plus, when i simply print assignee.emailAddress i can see that it outputs the expected email address.
What drove me crazy is that if i do this, the if statement actually works (of course with a valid email)!
{{#if(equals("myEmail@address.com", fields.assignee.emailAddress))}}
I was told to use unique in the for each smart value, but it doesn't seem to work (the send email action never triggers)
Does anyone has a clue?