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

How can I map fields from my email requests to their correct field using Automation?

JayJuan Jones January 25, 2022

Hello Everyone! 

I am having some issues figuring out why when users create issues via email they are not being mapped to the correct fields in JIRA and coming into the system looking like this:

email requests updated.png

Any idea of the syntax I might need to use in Automation to get this data mapped to it's correct field in JIRA?

 

2 answers

1 accepted

1 vote
Answer accepted
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2022

Hello @JayJuan Jones, incoming mail just maps the subject line to the summary and the email body to the  description. How are you trying to map the other fields?

 

Thanks,

Kian

JayJuan Jones January 31, 2022

Hello @Kian Stack Mumo Systems I am trying to map the other fields using automation! Specifically the User's First, Last Name, Phone Numbe and the email address. Is there any way I can use automation to pass these values into the correct fields? 

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2022

Do you have an example of the automation rule you are trying to run?

JayJuan Jones January 31, 2022

yes so if you look at the screen above, as you can see, the information to the far right side of the screen is not being populated, I am trying to use the automation rule below to change that, but so far I've not been able to get it to work; mind you, I have been using regex code I've found from the Atlassian Community to get an idea of how to make it work the way I need it to, but nevertheless, I'm still not having any luck. Do you know the correct regex syntax/smart values I should be using to achieve this? jira automation .png

JayJuan Jones February 2, 2022

@Kian Stack Mumo Systems any updates?

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2022

@JayJuan Jones

It's possible to extract the values using Regex, but it's definetly a non-trivial process. I'd need to see how the description is actually formatted to provide any guidance.

JayJuan Jones February 2, 2022

what do you mean how it's formatted? Is the image above not good enough? It looks like it's coming into a table. What do I need to provide to you to give you an idea of how it's formatted? 

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2022

I'd need to see the actual text driving the table. Do they always come in as the same format?

Thanks,

Kian

JayJuan Jones February 2, 2022

like the html markup? if so, here it is for the Name, User Email Address, and Phone fields: 

<td class="pm-table-cell-content-wrap"><div class="pm-table-column-controls-decoration ProseMirror-widget" data-start-index="1" data-end-index="2" contenteditable="false"></div><p>BERTA BANUELOS</p></td>

<a href="mailto:patrisiabanuelos31@gmail.com">patrisiabanuelos31@gmail.com</a>

<p class="pm-table-last-item-in-cell">7193511216</p>


and yes, they all come into JIRA in this format. 

JayJuan Jones February 4, 2022

is this the text you were expecting? 

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2022

Try matching like this:

 

{{issue.description.match(".*\|E-mail Address\|(.*?)\|.*")}}

JayJuan Jones February 4, 2022

so I made the update to the match condition, but how will I update the field I want (User's Email Address) if it does match? It looks like it is passing the comparison successfully, but it is not updating anything.

I need to extract the value of the Email Address in the description field and pass/paste it into the User's Email Address field. 

Edit Issue Prop.png

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2022

Try something like this

 

Screen Shot 2022-02-04 at 4.21.02 PM.png

 

Just replace "summary" with your issue field that you want to update.

JayJuan Jones February 7, 2022

when I updated mines to that, nothing happened.. it didn't meet the condition of the compare so it wasn't able to change anything.. 

email support.png

JayJuan Jones February 7, 2022

even after I change the condition and make the trigger successful, the user's email field is not being changed, I think the regex you're supplying needs to be tweaked, please take a look at this post and let me know if you can help me come up with something similar:

Solved: Automation Regex - extract email address from Issu... (atlassian.com)

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2022

@JayJuan Jones, I'm sorry.  I'm not sure what the issue is. What I've supplied to you works for me. 

JayJuan Jones February 7, 2022

I think the issue I had is that I actually typed out "regex" instead of using the contains regular expression in the dropdown, there is only one issue now, when the email is copied into my field there is a "[" showing up before the email address. any idea how I can fix this?

almost.png

JayJuan Jones February 7, 2022

@Kian Stack Mumo Systems please let me know what you think, I am almost there... all your help has been VERYYYY much appreciated!

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2022

This is the regex you need to use to edit the user email address.

{{issue.description.match(".*\|E-mail Address\|\[(.*?)\|.*")}}
JayJuan Jones February 8, 2022

@Kian Stack Mumo Systems YOU'RE THE BEST!!! Thank you for all your help!!! So in order to pull in the other fields, would I just use this:

{{issue.description.match(".*\|Phone Number\|\[(.*?)\|.*")}}

{{issue.description.match(".*\|Name\|\[(.*?)\|.*")}}

Also, for the name, how would I split that out between User's First Name and User's Last Name?

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2022

Phone number and name should be like this -

 

Phone Number: {{issue.description.match(".*\|Phone Number\|(.*?)\|.*")}}

First Name: {{issue.description.match(".*\|Name\|(.*?) .*\|.*")}}
Last Name: {{issue.description.match(".*\|Name\|.* (.*?)\|.*")}}

JayJuan Jones February 8, 2022

so would you suggest creating separate automations for each field? or would I just add another edit issue condition in the same automation to update the others?

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2022

No, you don't need to create separate automations. Just add these fields into your existing "Edit Issue" action and set the values using the smart values I supplied.

JayJuan Jones February 8, 2022

@Kian Stack Mumo Systems awesomeeee! there is an issue I am facing now with the email not pulling in for certain issues/requests. I added a log event to the automation to tell me the user's email address and it looks like in the cases where the condition is not met, it because the regex is not finding their email address. Should the regex be tweaked for these kinds. Here is the html markup if that helps, even though it appears to be the same:

<a class="sc-eXEjpC bJcbJv" href="mailto:larii_lh@yahoo.com" title="mailto:larii_lh@yahoo.com" data-renderer-mark="true">larii_lh@yahoo.com</a>

 

woah.png

JayJuan Jones February 9, 2022

@Kian Stack Mumo Systems I feel like I owe you lunch at this point lol 

JayJuan Jones February 10, 2022

@Kian Stack Mumo Systems any luck with this one?

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 14, 2022

I would take the request that was logged and run a manual check to see what the text is being converted to.

You could have a manual trigger which uses the "Log action" action. Have it log the description that was created from the issue which is presenting a problem.

 

It should look something like this:

Screen Shot 2022-02-14 at 9.02.48 AM.png

 

Once you run that, you can get the actual description and use something like https://regex101.com/ to test out the regex supplied on the description you get out of the manual rule that you ran.

 

At a certain point, I can't keep figuring out what the issue with the regex is, and having a tool like Regex 101 or another regex tester is going to help you learn the regex yourself!

JayJuan Jones February 14, 2022

hi @Kian Stack Mumo Systems that's the issue, when I check the log, the email is not coming up at all but I can see the HTML markup by using the developer tools. I know you have went over and above on this one for me, but can you please help me figure this out one last time? 

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 14, 2022

@JayJuan Jones,

Create a NEW rule with a manaul trigger. Do not add any conditions and have it log just the description alone. You need that if you want to see what is going wrong with the regex.

JayJuan Jones February 14, 2022

yes, I got it:

Your request has been sent from [tyler.dall@yahoo.com|mailto:tyler.dall@yahoo.com] user name . Here are the user provided errors |Name|Tyler Dall| |Email Address|[tyler.dall@yahoo.com|mailto:tyler.dall@yahoo.com]| |Phone Number|7193522932| |myColorado Username|tylerdall| |OS Version|iOS 15.2.1| |Phone Model|iPhone12,1| |Feedback or Error Being Reported|How do it submit my vaccine card to get it in the app?|


JayJuan Jones February 14, 2022

@Kian Stack Mumo Systems the form wouldn't let me post this response :(

jira help.PNG

JayJuan Jones February 14, 2022

I notice one of them says Email Address and the other says E-mail Address, should the regex be updated to {{issue.description.match(".*\|Email Address\|\[(.*?)\|.*")}} and .*\|Email Address\|\[(.*?)\|.*

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 14, 2022

Yeah, you would need to update the regex to account for both. Or create an if/else branch to catch both regex expressions.

JayJuan Jones February 18, 2022

@Kian Stack Mumo Systems I really can't thank you enough for all of your help and hard work on this. I am definitely more comfortable using regex myself now and that website you referred me too is AWESOME! Also, that tip you gave me to use the audit log is VERYYYYY HELPFUL! Enjoy your weekend!

0 votes
Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2022

I am working on a similar automation and I found that this works if the reporter is the customer:

Screen Shot 2022-02-02 at 1.40.08 PM.png

Screen Shot 2022-02-02 at 1.39.58 PM.png

JayJuan Jones February 2, 2022

thanks but this isn't going to solve my issue. I am looking for a way to get the data from the description field for our email requests and map them to their correct fields. I have already found out how to change the reporter to match the user's email address.

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2023

How about the opposite solution from email to reporter? ') 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events