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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation rule for job created by email...

HI there, 

I am trying to build an automation on a job coming in via email...

I want the automation routeen to look at the domain name of the email and if it matches my rule it updates a custom field.


i.e.   changes a custom field to a pre-defined value of Hollington


I can't get my head around how to do this?

4 answers

1 accepted

1 vote
Answer accepted

Hi Mark,

So to confirm, does a ticket already exist within Jira or do you want to create one based off the email domain?

If the latter, you can do this via the following:

Settings > System > Mail > Incoming Mail > Add Incoming Mail Handler

On the second screen, there is a field 'Catch Email Address' this will trigger the action (E.g. create new ticket, update existing ticket, etc.) for anything that hits that address - like the one you reference above.

If it's the former, and you're already creating issues based off incoming mail and just want to update them then you'd look towards the automation rules (Note that the default action for a mail handler is to create a ticket or update an existing one' - so this may already do what you're after).

Settings > System > Automation > Automation Rules > Create Rule

Then choose the Trigger of 'Issue Created', add a new condition of 'Advanced Compare Condition' with the following parameters:

First value: {{reporter.emailAddress}}

Condition: Contains

Second Value:

Lastly, add a new action of 'Edit Issue' being sure to choose the field you wish to edit (Requires that you've created the custom field already).


Final note: Be sure to set the mail handler and the automation rule to the same project; a mail handler can only be associated to a project - whereas a rule can be global and trigger based off the broad conditions. Depending on how you're setting the automation rules, the conditions may be too constrained (I.e. looking for issues created in 'ProjectB', but the mail handler is creating them in 'ProjectA').

Worked perfectly. Thank you Diskonekted

This is great, thank you Diskonekted 

For note, you'll need to adjust the above to suit your conditions - my testing was to simply add a label to some tickets, but you'll know what fields you want to adjust and with what values.

Hope that helps.

Right, so assuming you've already got an Incoming Mail Handler (part 1) you can move to part 2.

1. Incoming Mail Handlers

Project Settings > Mail > Incoming Mail > Add Incoming Mail Handler

Make sure you set the mail handler for the correct project and using the 'Catch Email Address' for "".

Assuming you went with the default action (E.g. Create or update a ticket) this will create a ticket everytime someone emails that address.

2. Setting the automated activity

Project Settings > Automation > Automation Rules > Create Rule

Set the following:

Trigger: When Issue Created

Condition: If Advanced Compare condition

  First value: {{reporter.emailAddress}}

  Condition: Contains

  Second Value:

Then: Edit Issue Fields

  Field: Custom Field

  Value: Foo 

Hi Mark,

I posted a lengthy response to this detailing how it can be done, but seems that my post was lost. Will try to re-port once I've put the steps back together again.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

479 views 5 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you