Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Use flow to select Hyperlink, download and create a file in one drive

(0) ShareShare
ReportReport
Posted on by 40

Hi there.

 

is there a way to get flow to select a hyperlik from an email (link contains access to a document.docx) then download the document and save it to a one drive folder?

 

I know we can do it with attatchments from an email which works fine but I need to be able to get the document from a hyperlink from within the email?

 

thanks for reading

  • DexPoint Profile Picture
    163 on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    I would think it is possible to add data to an existing file but there are lots of details that are required. thinking about it for my flow, i'd probably save it to One Drive, then convert it to a table, then id list rows and put specific filter in that does a match. then compare it against an existing table data and add any that dont exist. (this could be one method) the other could you just get the file content add into the file, then run remove duplicates (using excel macro?).  all depends on what your files look like and structure. Power Automate really likes Excel Tables and it makes it easier to get specific data sets.  I have a formula for creating a dynamic table as well that i use as i have a program that takes a file and creates a table based on used rows. so this is also possible.

     

     

     

    I'll try and detail it out as best as possible for you. This is what i did and this is specific to sales data from a specific retailer.

    DexPoint_0-1701259883816.png

    DexPoint_1-1701259927395.png

     

     

    Thats the whole flow. here are the details

     

    Split Email function

    Split(outputs('EmailBody')?['body'], outputs('Enter'))
     
    DexPoint_2-1701260025897.png

     

    Select

    From- this runs through each line and assigns a number

    range(0,length(outputs('SplitEmail')))
    String - 
    outputs('SplitEmail')?[item()]
    Position - 
    Item()

    Filter array, then searches each string and finds "Report Name". the email sender actually sends 2 emails. one for inventory and one for sales. i run the same flow but just have a condition to write different files.

     

     

    DexPoint_3-1701260191463.png

     

     

    Find Position - purely returns the position i added in the select statement of that line.

     

    URL - uses the position of "Find Position +1" so i have the right line. then splits that specific line.

    outputs('SplitEmail')[add(outputs('FindPositionURL'),+1)]
     
    Remove Brackets - cleans up the URL so its usable
    replace(replace(string(outputs('URL')),'[',''),']','')
     
    Condition - does a search for specific words (As mentioned i use this flow for inventory and sales files. so it decides where and how to copy the files.
     
    Here is the saving and creation part.
    Upload file from URL - takes the Brackets remove output (URL Cleaned up) and downloads the file from that link. then saves it to the URL in one drive. (Backend sharepoint).
    DexPoint_4-1701260426056.png

     

    The next steps are to copy that file from one drive and save to sharepoint. i do this 2 times. one for current week and one for historical. the difference is one overwrites and one creates new file name. 

     

    This is important because on sharepoint, we automatically have our reporting tool read the file in, this essentially refreshes the data / appends data. the historical is purely for tracking purposes and make sure we track each week.

     

    The last step is to take the received emails and move them to processed this is just so i know that emails are working. 

    DexPoint_6-1701260596377.png

     


     

  • A_Scott Profile Picture
    5 on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    Can you provide all the steps you built to download the file from the link within an email and save to OneDrive? Is it possible to add the data to an existing file rather than saving as a new file?

  • DexPoint Profile Picture
    163 on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    This post is rather old, maybe there wasn't a solution back in 2017. however i recently made a flow that receives an email, finds the link to download the report, isolate the link, download it to OneDrive, then copy it to Sharepoint.

    The feature i used is "Upload file from URL" its a OneDrive feature.

     

    Give it a go!

    DexPoint_0-1693894894952.png

     

  • Bill51106 Profile Picture
    152 on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    I need a PA cloud solution 😕 Thank you.

  • sayyedkohler Profile Picture
    313 on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    I think, now it can be achieved using Power Automate Desktop Flows.

  • Community Power Platform Member Profile Picture
    on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    Thanks!

  • Bill51106 Profile Picture
    152 on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    I ended setting up a Zapier email account, it parses it, actually downloads the file and lets me email it where I grab it with a Flow since SP isn't supported under Zaps yet.

  • Community Power Platform Member Profile Picture
    on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    Hi Courtney,

     

    Can you please give me some example? I am interested in this.

  • Bill51106 Profile Picture
    152 on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    @Courtney still helping people set this up?

  • farhandsome Profile Picture
    175 on at
    Re: Use flow to select Hyperlink, download and create a file in one drive

    @Courtenay ,

     

    Is this something you are still offering?

     

    Thanks,

    Farhan

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1