Missed Team ’24? Catch up on announcements here.

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

How can I get the email address out from this using automation?

JayJuan Jones March 2, 2022

Hello, I have an automation rule set up to search the issue.description and find the email address and copy it to the correct fields. The format of the description has changed since I've initially implemented the automation and now I am having trouble pulling it out. Here is a snippet of what my description looks like:

* Chat started with*Modesto Valdez* * SYSTEM_MESSAGE Thank you for contacting myColorado Support\! We are placing you in the queue. To accommodate you as fast as possible, please ensure your app is up to date with the latest version. Please note that we are currently experiencing a high volume of chats, and we are working as quickly as possible. If you do not receive a reply within 2-3 minutes, please leave your name, myColorado username, and email or phone number to contact you. Thank you so much\! 9:36 AM * Craig 9:36 AM Hi Modesto * 9:36 AM How can I help out this morning? * Modesto Valdez Hello, my ID app is giving me a turquoise screen when I pull it up is there a reason why? 9:36 AM * Craig 9:37 AM So to clarify, is your Digital ID not displaying your ID when you tap on it - also is there any message on the turquoise screen that's dispaying? * 9:38 AM *displaying :) * Modesto Valdez Not displaying yes. It’s not should a message no 9:38 AM * Showing* 9:38 AM * Craig 9:38 AM Let me take a look and see what might be occurring - did this just start recently? * Modesto Valdez Yes today  9:39 AM * Craig 9:39 AM And the phone you're using - is it an iPhone or Android and which model please? * Modesto Valdez An iPhone 13 9:39 AM * Craig 9:39 AM Perfect. So I can look into this further, please kindly provide the following information used when setting up the myColorado app initially: your phone number, email address and username * Modesto Valdez 7209659876 9:40 AM * [modestovaldez142@gmail.com|mailto:modestovaldez142@gmail.com] 9:40 AM * Mvaldez98  9:40 AM * Craig 9:42 AM Thanks\! Also, if you can confirm which app version you're using currently - our latest version is 6.0 - which you can see if you tap on the More (three lines) at the bottom right of the myColorado app > scroll all the way to the bottom of the screen and you'll see the app version * 


as you can see, the email address is coming in right after that mailto: 

any idea how I can tweak my automation to account for when the description is formatted like this?

Here's what I currently have:



automation rule.png

1 answer

0 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2022

Hi @JayJuan Jones Maybe try this for your regex?

(?<=mailto:)(.*)(?=])
JayJuan Jones March 3, 2022

no luck with this, it's not even pulling a value back.

{{issue.description.match(?<=mailto:)(.*)(?=])}}

advance.png

JayJuan Jones March 3, 2022

any other ideas?

d_kirsching March 4, 2022

@JayJuan Jones 

You can use this regex : {{issue.description.match("\W([\w\-\.]+@[\w\-\.]+)+\W")}}

I've tested and it works fine.

Capture d’écran 2022-03-04 à 09.50.26.png

JayJuan Jones March 4, 2022

looks like it's pulling in, but its adding it to my email field 3 times, any this can be tweaked to only pull it in once and remove the other ones? or remove the comma and anything after it?

d_kirsching March 4, 2022

Hi @JayJuan Jones 

You can store in a variable 

{{issue.description.match("\W([\w\-\.]+@[\w\-\.]+)+\W")}}

and use {{variable.substringBefore(",")}}

regards

JayJuan Jones March 4, 2022

this is what I have right now:

auto 1.1.png
Can you give me an example on how to do what you said to store the variable? 

d_kirsching March 4, 2022

@JayJuan Jones 

An action Create a Variable is available in Automation

9C73CE59-B871-43A5-B571-F168AF6988FB.jpeg

 

JayJuan Jones March 7, 2022

okay gotcha, I added that but how would I use it? Would I just be assigning the value of the variable, like {{mailtext}} And is the SmartValue the same for Mail and mailtext?

JayJuan Jones March 7, 2022

Also, it looks like it still set the email address twice :(

d_kirsching March 7, 2022

@JayJuan Jones 

Hi

You just need to indicate this variable {{Mail}} in my screenshot in your edit issue fields action.

ps : don't take care about {{mailtext}}

JayJuan Jones March 7, 2022

gotcha! I'm still getting the email copied in my field twice :(

d_kirsching March 7, 2022

Could you try this pls : {{Mail.substringBefore(",")}} ? 

JayJuan Jones March 7, 2022

got it!!! you're awesomeeeee! I learned so much from this post and now I am about to revamp all my automation rules!!! 

d_kirsching March 7, 2022

So nice to hear that :) 

 

Glad to help.

Could you please voted for an accepted answer in this thread ? 

Have a nice day.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events