How to pull back URL from email body

Hi,
Hope someone can help here.
I’m trying to write a simple workflow that will look at my inbox for and unread emails from our Help Desk.

These emails come like this…

I want to go to the URL which is behind the “LINK” (service Now) and do various update on that ticket.

This is what the body of the email looks like when I do a “Write Line” of “[CurrentMail] Body”

I’m looking to pull out the URL which is surrounded by <>

I tried to use some of the new activities like ‘Text to Left/Write’ and ‘Text Modify’ but I can’t see how to make them work.

Any help appreciated.

I am able to do this in Studio but wanted to prove this could also be done in StudioX

The code I’m using in Studio is …

SN_URL(0).ToString.substring(1,SN_URL(0).length-2)

With SN_URL being the complete URL including <>.

Thanks,
John.

Should have said I’m using the “Matches” activity in Studio to populate SN_URL.
This activity is not available on Studio X

Found a solution for this using the “Text to Left/Right” activity.
It involves using 2 of these…

Hy, instead of write line use write cell and then use text to column activity to split and isolate the link. Then read cell to read only the link and output it to application card to open in browser

@HoriaBelu Thanks, will try that too.

On a slightly different topic…

In the ForEachMail activity it’s possible to filter based on from/to/cc. etc…
I would like to filter by From + I want to look for some text in the Subject.
Subject is not one of the filter options.
It it possible to add manually?

inside the foreachmail add a IF and use condition builder from there to filter based on your needs.

regarding the part that you need to add manually, i’m not sure if i understood what you are asking, but you can use the ask when run option from the + menu

@HoriaBelu Thanks.
I’m struggling with the format of the Condition builder but I will keep working on that.

thanks…

which studiox version are you running? since newer ones, like 20.10, you have directly on the foreachemail the option to filter based on from/to/subject and so on. if not just use a IF and condition builder like i said:

@HoriaBelu
I’m actually using the latest version but “Subject” is not one of the filters I’m afraid.
filter

I think I can build this afterwards and trying to use the “SaveForLater” activity but getting an error.

subject

that’s not correct, place a IF and condition builder inside the for each email.
But if you are using the latest released Mail package 1.9.3 you should have all filters available on the for each email activity

Yes, thanks, I now see the “Subject” as a filter option now that I did the update.
Thanks for your help.

JOhn.

1 Like