Showing results for 
Search instead for 
Did you mean: 
New Member

Download File from link in email

How I can download a file from email through flow 


Previously I received daily excel file as an attachment and my flow takes a copy of attachment and save in one drive, currently, email administrator change the rule and this file come to my email as a link, example a below. How can I create the flow that the file downloads from the link and copy to my one drive? The email attachment is as below 


Attachment Download Link

Click here to download

Super User II
Super User II

There is no real easy way to do this, but I imagine it could be done. You could either try and scrape the a href tag out of the code behind directly from the email. Example:

uriComponentToString(replace(uriComponent(body('Html_to_text')), '%0A', ''))

Or you could great a SharePoint list item for each new email and try and manipulate the link from within the SharePoint list column.

For the list column, if the link is always the same like Click here to download you may be able to use logical expressions with dynamic variables to search for that text and then convert it to the actual link and then send an HTTP request

Resource Links:

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (1,483)