web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Select hyperlink in Ou...
Power Automate
Unanswered

Select hyperlink in Outlook email body to download a report and save to SharePoint

(0) ShareShare
ReportReport
Posted on by 29

Hello, I've got a flow that I'm struggling with trying to get created. I have built a Power Automate Desktop flow to log onto a website, browse to a report page, toggle a few parameters, and request a report. The output from that flow is an e-mail with a hyperlink to download the report (no email attachment). I'd like to create a flow (I think a Desktop Flow again) to 1) click the link, 2) download the file, and 3) save the file to SharePoint, overwriting the previous version (I need the filename to remain static). From there, I've got other automation built to ingest the report where needed to update and add records to my dataset.

 

I'm struggling to get everything functional once the email is in my Inbox. I've been working with 'Launch Outlook' and 'Retrieve email messages from Outlook'. Am I making this more complicated than it ought to be? Is it better to record in the Outlook Desktop app or Outlook Online to try piecemealing everything together?

 

Thanks in advance for any guidance that can be provided.

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You should not try to "click" the hyperlink in the email. Instead, when you use Retrieve email messages from Outlook, you will end up with a list of emails in %RetrievedEmails%. You should then build a loop (because it's a list, even if it only contains one email), to process them, such as a For each. This will generate a %CurrentItem% for you, which will be of type "Outlook email message". This variable type has a property called .Body (can be accessed as %CurrentItem.Body%). You should parse that (using Parse text) to get the URL. 

     

    Once you have the URL, you can use Launch new {browser} and navigate to that URL. Or, if it's a direct URL to a file with no authentication needed, you can even use Download from web to download the file directly without even launching a browser.

  • GUSers-OTP Profile Picture
    29 on at

    Thank you @Agnius, your feedback has been quite helpful, but I'm not fully there yet.

     

    I'll paste what I've got.

    GUSersOTP_0-1706728423261.png

    Below is a look at what the e-mail looks like. Selecting the 'Download Report' link downloads the CSV to my Downloads folder. My end result is to save it (renaming it) to SharePoint overwriting the previous version to update the latest & greatest data.

    GUSersOTP_1-1706728579343.png

     

    Thanks for any additional guidance you or someone else can provide.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    %Position% is a numeric value that represents the position of the text you searched for inside the text you parsed. What you should do is enable Regular expressions in the Parse text action to get an actual match. See this video as a tutorial for what regular expressions are and how to use them in PAD: https://www.youtube.com/watch?app=desktop&v=5cPMEBH5tj8

  • GUSers-OTP Profile Picture
    29 on at

    Ok, I think I'm following you with using that Regular expression generating the Match variable. However, I'm lost now as to what to perform after that. So I think we've found the text in the email body to select/open (for the hyperlink). Now I need to take action on that. When I perform it manually, it downloads the file to my Windows Explorer Downloads folder, then I open it and do a Save As. I don't really care what all happens in the interim, I just need to select the link to download and overwrite my current file with the lastest and greatest version each day.

     

    You're helping immensely here, but I'm running into the need to understand coding in this low/no-code application. Copilot hasn't been able to decipher all my questions to help get me to what I'm looking to do.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard