Send automated email to customer email account when a Support Ticket is created.
Asked by Ray:

Is it possible to send an email to a specific email account when a customer from the same domain creates a support ticket?

For example...

1. Customer bob@abc.com creates a support ticket.
2. When the ticket is submitted by bob@abc.com an email should be sent to support@abc.com as well as bob@abc.com

This flow would only work for abc.com domain users.


Answers:
author: Luiz Ricardo Pereira da Silva
body: Hello [@Ray](/t5/user/viewprofilepage/user-id/5418644) ,  
It is possible through Automation for Jira.  
Using the Variable action, create a variable containing the Reporter's E-mail:  

**{{issue.reporter.emailAddress}}**

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/303427i61D9EDA5682A550D/image-size/large?v=v2&px=999 "image.png")  

Create another variable that will store the Domain:  

**{{reporter.substringAfterLast("@")}}
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/303428i8D1DF7CB5CFEF5FF/image-size/large?v=v2&px=999 "image.png")**   
Create a Condition that compares the Domain variable with the specific Domain:  

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/303429iDF4B18F6D6357102/image-size/large?v=v2&px=999 "image.png")  

Use the Send E-mail action to send an E-mail to the reporter if necessary and in the "CC" copy add the specific E-mail:  

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/303430i0284CDA929F7B656/image-size/large?v=v2&px=999 "image.png")  

It will look something similar to this:  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/303431iA45CEEE5C3F5F9DD/image-size/large?v=v2&px=999 "image.png")  

**Hope I helped you!**

comments: author: Ray
body: Thanks for the guidance Luiz. For some reason I'm getting a success message in the Audit Log, but no email. When I look in the Audit Log I get this message...  
![Audit Log.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/303571i62578437D86AFC11/image-size/large?v=v2&px=999 "Audit Log.jpg")

It appears to be coming from the Issue Created step. Any help would be greatly appreciated.


author: Luiz Ricardo Pereira da Silva
body: Hello [@Ray](/t5/user/viewprofilepage/user-id/5418644)  
Could you post the automation structure so I can analyze it?  
From what I can see in the image, success is linked to some action prior to the conditional, however the conditional was not accepted.  
If the action of sending an email is after this conditional, it is probably because the issue does not meet the condition and the email was not sent.


author: Ray
body: Here you go [@Luiz Ricardo Pereira da Silva](/t5/user/viewprofilepage/user-id/1177075)

![Audit Log #2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/303573iDAAD749956C0C316/image-size/large?v=v2&px=999 "Audit Log #2.jpg")


author: Ray
body: Here's more detail [@Luiz Ricardo Pereira da Silva](/t5/user/viewprofilepage/user-id/1177075) . I am simply just trying to test this out. So I am creating a new issue with my own account (ray@frequencyads.com). Hoping that it will send the email to me as the reporter and as the cc. As I said....just trying to test this out so I know it's working before I try it with a customer.

![2024-01-31_13-38-40.png](https://community.atlassian.com/t5/image/serverpage/image-id/303575i66066EEB7C1BAAF7/image-size/large?v=v2&px=999 "2024-01-31_13-38-40.png")![2024-01-31_13-38-52.png](https://community.atlassian.com/t5/image/serverpage/image-id/303576iB499BFC34206B689/image-size/large?v=v2&px=999 "2024-01-31_13-38-52.png")![2024-01-31_13-39-04.png](https://community.atlassian.com/t5/image/serverpage/image-id/303577iC42C61E8BB951ED5/image-size/large?v=v2&px=999 "2024-01-31_13-39-04.png")![2024-01-31_13-39-19.png](https://community.atlassian.com/t5/image/serverpage/image-id/303578iEEBDC86C29A1C3EC/image-size/large?v=v2&px=999 "2024-01-31_13-39-19.png")


author: Luiz Ricardo Pereira da Silva
body: Enter the name of the variable Reporter for reporter, this capital R is affecting its recognition in the second Variable that retrieves the domain.:  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/303592iC671FBC0E65F2AB3/image-size/large?v=v2&px=999 "image.png")  
Also add an action called log action by inserting the name of the variable inside so that the result appears in the Execution log:  

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/303594i14E30D0558DF8B57/image-size/large?v=v2&px=999 "image.png")  
Create an Action log for each Variable.  
This will help you with troubleshooting.


author: Ray
body: [@Luiz Ricardo Pereira da Silva](/t5/user/viewprofilepage/user-id/1177075) Thanks so much for your help. This worked perfectly. Thanks again!


author: Richard Scholtes
body: You could also organize those users from the same domain in one customer Organization.

Then you could the create the automation that if an issue is created, check if it is from Organization abc and if yes send the mail


Tags: cloud

jira-service-management

jira-service-management-cloud