StudioX - Open URL link from Outlook Email

Hi All,

I am very new to StudioX and I’m trying to open a URL link from Outlook Email. The URL link will prompt a report download from browser.

While the link remains the same, there’s a number sequence at the end which changes for each email received.

I’m using the following activities:

Use Desktop Outlook App > For Each Email > Use Application Browser (Browser URL: [CurrentMail] Body)

The sequence above only appears to works if the URL Link is the only content in the email.

However, the email body is always like this…

xxxxxxxxxxxxxxxxxxxxxxxxxGenerated from prod ENVxxxxxxxxxxxxxxxxxxxxxxxxx

Please download report from below url :
https://xxxxx.prod.aws.xxxxxxxx.net/xxxxx-reporting-service/api/downloadReport?idReportGroup=0280441

Note: The URL link is always complete, I’ve just removed for confidentially.

@Fabs

Two ways

  1. Get the html body from email …and then save it in text file as .html file and open the file using use application /brwoser and then get url or click the url using click get or click activities
  2. After extracting use regex activities and extract the url using this regex pattern (?=https:).*

Cheers

Hi @Fabs
For getting the URL from the body you can do below way:

str_Body=CurrentMail.Body.ToString

The above syntax will store the body in a variable and you can use the below syntax to extract the URL.

str_URL= System.Text.RegularExpressions.Regex.Match(str_Body,"((?<=\n\s*)[a-z](.*))").Value

Refer the below image for better understanding:

Hope it helps!!

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