Create an email request ticket if sent to an alias of main email
Asked by Ignacio:

Good afternoon, everyone.

I've the following issue/question:

I have an email account connected to my JMS platform; lets name this example@gmail.com. I have an automation set up that will create a support ticket in the platform if an email is sent example@gmail.com and if the sender's domain equals an specific domain.

I've recently added an alias to example@gmail.com in gmail's platform; lets name this alias@gmail.com.

If an email is sent (assuming it meets the domain criteria) to either example@gmail.com or alias@gmail.com, a ticket will be succesfully created in my platform.

The issue is the following:  

If an email is sent to either of the email addresses, I have no way of knowing which email was contacted within the ticket. The way I thought of "fixing" this was:  

- If mail is sent from to a customer to example@gmail.com -\> Create a ticket with a custom tag saying with "example" as it's value.

- If mail is sent from a customer to alias@gmail.com -\> Create a ticket with a custom tag saying "alias" as it's value.

Is this possible through automation? If it is, is it possible without connecting the alias email to my JMS platform?

Any input is greatly appreciated.


Answers:
author: Brant Schroeder
body: [@Ignacio](/t5/user/viewprofilepage/user-id/5453114) Welcome to the Atlassian community

We have a similar thing with aliases. We have several aliases that a request can come from. We identify the alias and have an automation that runs and does the following:

* Sets the request type.
* Sets the assignee if necessary for the request type.
* Sets a component if necessary for the request type.

The request type that is used on the email shares the same issue type as several other request types. Many of those request types are hidden from the portal but can be applied to the email request making it easy to manage and place in queues.

comments: author: Ignacio
body: [@Brant Schroeder](/t5/user/viewprofilepage/user-id/769100) Hello, Brant. Thank you for the welcome.

I kept trying out options after submitting the question and I ended up with a rough sketch of what I'm trying to accomplish:  

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

I did this under the assumption that reporter.emailAddress would be the alias I have for my main email, however, this didn't work; likely because reporter refers to the person who emailed the alias rather than the alias instead.

What would the correct way to set this up be? I'm mostly going for: If issue is created and alias email was the recipient instead of the main one -\> do X.

Thanks in advance, I'm trying to work on improving automations so feedback/suggestions are always welcome and appreciated.


author: Brant Schroeder
body: [@Ignacio](/t5/user/viewprofilepage/user-id/5453114) We used to have the mail handler add the alias as a CC so we can run our rules of that. We ended up changing it and adding an appendage on the subject field that we then use to identify where it came in from.


author: Brant Schroeder
body: [@Ignacio](/t5/user/viewprofilepage/user-id/5453114) can you accept the answer to help others?


Tags: cloud

jira-service-management

jira-service-management-cloud