How to fetch url from a string in outlook

i need to fetch the url from a string(hyperlink) in my mail body in outlook.hyperlink

How can i do this.

Hi. Read an email as html

i did not find any activity inside the provided workflow that captures the url. Could you rather explain how to do it.

Could you please paste your email body as html here?

@Yurii_Horobets can share the screenshot of the mail but email body as html won’t be possible as it is a company mail.

The more information you provide, the better community helps :grinning:

If you are in a hurry then:

Try hot key Right click > View Source to bring up the view source window.

Use Attach Window to attach to the View Source Window.

Then use Regular Expression to get anything that starts with “http” near the “S-List”.

If Regex is not an option, then use GetText to read the entire view source text into a string

Use String parsing to find http after the world “S-List”.

@AndyMenon well i didn’t get the entire thing what you told sorry but i am quite new to ui path but what struck me is that i can use the right click actvity to copy the hyperlink from outlook, is there any way i can assign the copied url into a variable in ui path. Or was it some different approach you were mentioning?

Yes you can. Without it I don’t see why one would use RPA :smiley:

If you have managed to right-click on the link and select the Copy-Link option, then use the Get from Clipboard activity to pull that value from the Clipboard and assign it to a variable.

If not, you can do this long hand method that I was talking about earlier. Here is a demo of your case that I have created at the simplest level. It starts with the email you receive.

First, perform a Right-Click anywhere in the email body

Then Hot-Key SHIFT+“s” will select the View Source option (or you can select the View Source option straight away or there might be other ways to do it if you research it)

Once you make the Robot click View Source option, the source of the email will most likely open up in a Notepad window.

Then you would Use a Get Text activity and read the entire content of the Notepad and assign the entire text in the notepad to a string variable

Finally, you can parse the section out of that string variable that starts after the section “Go directly to the” and the word ">S-list to extract only the URL and assign it to another variable.

Hope this helps

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.