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?
Community moderators have prevented the ability to post new answers.
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 all,
I have a similar, but slightly different challenge to tackle: I'd like to do exactly the same as @Tudor Tofan described, but I'd like to send the email to an Atlassian group instead of users.
The group is obviously a valid attribute (of type group) in my object, a log action on {{issue.Team.Group}} also returns the correct group, but still I'm getting following automation error:
Unable to send the email as the recipient's email address wasn't provided
Given that the recipient-field in the Send Email action also accepts group fields in issues, I'd expected that also group fields in objects would be valid.
Any idea on how to get this running?
Thanks and best regards,
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Stefan Draber Please create a new question for this and reference this question, instead of adding a comment on a 2 year old question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This topic is now closed as the discussion has become outdated. If you have more questions or want to continue the conversation, feel free to start a new topic. For more details on why we close older threads, check out our Rules of engagement - Atlassian Community .
Thank you for your understanding!
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.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.