Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Sending conditional emails directly based on user selections

jusgray February 9, 2024

Greetings, Community

I created a form and would like to send a confirmation email to the person who created the ticket (reporter/initiator) and to the user that the reporter/initiator selects. I've gotten this far but got stuck on what to do next.

For more context, I've created a nested form "Details" within the main form of "Security Access". Label is called "Dep. Approver". When a user selects "approver 1" and submits the form it should email the person filling out the form and the person selected with checkboxes. 

Any assistance in the right direction will be greatly appreciated. Thank you in advance for your response(s).

 

 

Screenshot 2024-02-09 132123.pngScreenshot 2024-02-09 132708.png

1 answer

0 votes
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2024

Hi @jusgray ,

When you say "Nested form" do you mean you've added the field "Dep. Approver" under conditional access in a JSM form?

Also, have you mapped the Dep. Approver to any Custom field in Jira or is this value stored only in the form?

If the value is stored in a Custom field then the automation becomes quite simple, you just need to fetch the value from the field and pass it as a value to the SEND EMAIL action.

If you're storing it only in the form, this might get tricky. You need to use APIs to get the value then. First you'll have to find the FormID using https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-get (or perhaps a different API). The to get the values use the below API to get it in Simple form:

https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-customer-request/#api-request-issueidorkey-form-formid-format-answers-get

Once you have the values, if there are more than 1 values loop thru them and send Emails.

Given your use case I would suggest you map the form field to a Custom field, since it makes life much easier and you may not need to apply a complex automation to process the Form values.

jusgray February 12, 2024

Thank you, I am new to JSM and sometimes forget the terms. I have a service request and have an attached form.

 

Your first suggestion worked where I created a custom field, but it appears I can only that to the request type and not to the custom form. I could work around that by adding another form, but it seems that I can only add one form per request type. Another option would be changing the layout options in the service request, but also doesn't seem like an option JSM provides.

 

Your second option seemed pretty solid as well, but not familiar with using API calls within JSM yet.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events