Hello all
In my JSM project, I have an Asset custom field called Team. It stores multiple objects of type "Team" from the CMDB. Among the attributes of the "Team" object, I have an attribute called "team_members" which stores multiple Jira users.
I'm having trouble building the following automation:
Whenever a new team is added on the ticket, send an e-mail to all jira users stored in the "team_members" attribute.
I've tried adding the following smartvalues in the "To:" section of the action:
{{Team.team_members}}
{{Team.team_members.accoundId}}
{{Team.team_members.emailAddress}}
The error I'm receiving is:
Could not send email, the 'To' address field is empty. If you have referenced a field it may be empty.
Any ideas of how I could make it work?
Hi @Tudor Tofan,
Welcome to Atlassian Community!
What type is the attribute? User? If that is the case and it accept multiple values then you have to use a branch so that you can iterate over each user in the attribute, similar to this branch that I use to set Business Approvers:
I would use {{Team.team_members.emailAddress}} to set the smart value in the branch and then use it in the To field.
Hi @Tudor Tofan -- Welcome to the Atlassian Community!
First, have you confirmed the asset, smart value contains the information needed?
Next, when a list, smart value is referenced like this:
{{Team.team_members.emailAddress}}
By default, it joins them with commas. However the Send Email action wants multiple values delimited with semicolons. Perhaps try forcing that with this:
{{Team.team_members.emailAddress.join(";")}}
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tudor Tofan ,
From what I understood of your request, it seems that you would find an alternative for this using Notification Assistant for Jira Cloud:
The app allows you to send notifications to multiple users that could help you with the task at hand.
Hope it helps.
Cheers,
Victor | Modus Create
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the suggestions guys. It was actually the problem with the e-mail address visibility. It seems that none of the users from that attribute (including myself), had the e-mail address set as public. As soon as I set my own e-mail address as public, it started working like a charm with
{{Team.team_members.emailAddress}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tudor Tofan
You might be able to discover the structure of the smart value for that custom field by using the issue API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.