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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,093
Community Members
 
Community Events
184
Community Groups

How to get accountId from a user email in automation

I have an email form that comes into service desk. Using automation, I am parsing the email out and want to use it as the reporter. Currently, I can use the "Add service project customer" to create the customer and then assign them as the reporter. However, if the customer already exists, the call fails and I do not have the accountId.

How do I get the accountId of an existing customer via email to use in automation?

2 answers

1 accepted

1 vote
Answer accepted
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 25, 2022

Hey @Brett Park and @Chris I recently found an article that @Bruno Altenhofen from Atlassian wrote describing exactly how to get a accountID based on email, using the Web Request functionality of Automation:

https://community.atlassian.com/t5/Jira-Service-Management-articles/Populate-a-user-picker-field-from-the-description-field/ba-p/2134905

The tricky thing in your case @Brett Park is then using the above to see if the user already exists. I guess you could use a "Compare two values" condition and check if {{webhookResponses.first.body.accountId}} does not equal Empty.

I just tested this and it seems to work.

I can confirm this method does work. Very helpful. 

Like Darryl Lee likes this
0 votes
Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 30, 2022

Thanks for the links. How is this done through an Automation? 

Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 31, 2022

There's add on in Jira Cloud that can help with automating the parsing. For example, JEMH.

 

Just to take a step back. Doesn't the e-mail handler for the service desk already handle this. When an e-mail is sent to the service desk e-mail, it should parse the sender e-mail as the reporter as long as you have turn on public sign up.

 

https://confluence.atlassian.com/servicemanagementserver/receiving-requests-by-email-939926303.html

We have a form that always sends from the same email address, but the actual sender's email is contained within the content. We need to check if that email has an account, and retrieve or create. ... the ability to create an account without knowing if one exists seems kind of like a pointless automation.

Brett, did you ever get an answer to this? I have a very similar situation and all I can find are solutions of people asking why you don't do it a different way (that is not possible because the email is just text in an issue description). 

Suggest an answer

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

Atlassian Community Events