Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation captures email from summary and changes reporter in automation

Troy Edmonds
Contributor
September 3, 2025

Hello 

needs some urgent help 

I tried everything including Ai 

I need to capture the email address of email request from the summary /subject line

look up users in Jira Cloud 

and change the reporter to that Portal customer 

Do I need to use Assets , or do you have other ways to do it 

Extract the email from Summary

  • Action: Create variable

    • Name: email

    • Smart value:

      {{issue.summary.match("([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})")}}
  • Condition (Advanced compare):

    • First value: {{email}}

    • Operator: does not equal

    • Second value: (leave blank)

(Optional hardening) Add an Advanced compare to whitelist your domain:

 

{{email.matches("^[\\w.+-]+@transport\\.nsw\\.gov\\.au$")}}
 

3) Look up the user in Assets by email

  • Action: Lookup objects

    • Schema: Org Directory

    • AQL:

      objectType = "Directory User" AND "Email address" = "{{email.toLowerCase}}" AND (Active = true OR Active IS EMPTY)
    • (Use the exact attribute names you created. Quotes are required for names with spaces.)

  • Condition (Advanced compare):

    • First value: {{lookupObjects.size}}

    • Operator: greater than

    • Second value: 0

4) Set the Reporter (only when a match exists)

  • Action: Edit issue

    • Click More options and paste this JSON:

      { "fields": { "reporter": { "accountId": "{{lookupObjects.first.\"Account ID\"}}" } } }
    • (Note the escaped quotes around Account ID because the attribute has a space.)

5) (Optional) If no match, log/comment

  • Add a New action → Log action (or Add comment) on the Else path:

    No Jira user found for {{email}}. Reporter unchanged.

1 answer

1 vote
Jeroen Poismans
Community Champion
September 3, 2025

Hi Troy,

As per usual, AI is only half correct. You could use Assets to achieve this, but that would require you having all people (I am deliberately not using the term users here) in an Asset schema, in your example provided by AI that would be Org Directory. 

Here you will have an Object Type (OT) with all people in it, in your example that would be Directory User. This OT will then have an attribute containing the Atlassian Account ID, which is what you really want to assign as reporter. This is a valid approach but you will have to have this all set up.

If your sole concern is setting reporter to a value, you don't need the whole Assets setup. In your automation rule (triggered on creation of the ticket):

  • Read the summary
  • Extract the email
  • Fetch the Atlassian Account ID directly form Atlassian (WebRequest)
  • Use the response to determine if there was a user
  • Fill in the reporter

The webrequest step of your automation should look something like this:

Screenshot 2025-09-04 083811.png

Replace {{object.Email}} with the variable you have parsed the email address to.

This will give you a response and you will find the Account ID here in the response, that you can then use to assign to the reporter field:

{{webResponse.body.first.accountId}}

More info on the webrequest action and automation:

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Send-web-request

Hope this helps!

Troy Edmonds
Contributor
September 4, 2025

What url do I need to use to capture the info from Atlassian ?

so the black out bar is our url 

Authorization i= our Api key?

Bit confused 

 

So yes

  • submit via email via web map portal 
  • jira captures the email in summary text in the form of email address of reporter
  • looks up the ID somehow?
  • changes the reporter to that person
  • send email to the reporter with request link 
Troy Edmonds
Contributor
September 4, 2025

The GET doesn't work our Government Firewall stops all access to the API call 

so that option is out. takes too long to get approvals to open it 

Jeroen Poismans
Community Champion
September 5, 2025

Troy,

The auth header is what you would use in for example Postman to do the call: Bearer API token.

Too bad for the GET then, then you are stuck with the option I first described.

  • Getting People data into Assets
    • People had an attribute of Atlassian Account ID
  • Lookup People based on email
  • Get the Atlassian Account ID
  • Set to the reporter field

Suggest an answer

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

Atlassian Community Events