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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Download CSV from butt...
Power Automate
Unanswered

Download CSV from button in email

(0) ShareShare
ReportReport
Posted on by 9

Hello,

I need to download a csv from an automated email (outlook) I recieve every day and upload it to our Azure blob storage so our DW (Snowflake) can use it for data harmonisation. However, the email contains merely a 'download your report' functionality and I can't seem to figure out how to do this (sorry!! trying my best and read through lots of PA community tips or stackOverflow comments but just can't figure it out).

Example of the daily email:

liesbeth_0-1661284735354.png

I have the premium PA subscription

 

Many many thanks in advance!

Kind regards, Liesbeth

 

Categories:
I have the same question (0)
  • takolota1 Profile Picture
    4,974 Moderator on at
    Re: Download CSV from button in email

    @liesbeth 

    I suspect the email body of this would contain that link information like the download url.

    If you can parse out that url, then you should be able to use a OneDrive Upload from URL action on it to get the file into your flow.

  • liesbeth Profile Picture
    9 on at
    Re: Download CSV from button in email

    thanks for your quick response Takolota!

    I tried that (using body and the contains function :

    contains(triggerOutputs()?['body/Body'],'https://urldefense.com/v3/__https://teads-analytics-reports.s3.eu-west-1.amazonaws.com/custom/connect/*')

     

    The link changes on a daily base so I need to use only a part of the url.

    I recieve an automated email in my inbox every day with daily updated data, that I need to upload as an Azure blob so we can grab it and use in Snowflake for our data harmonisation procedure.

     

    I'm not very good at this so any help would be massively appreciated!

     

    Kind regards,

    Liesbeth

     

  • takolota1 Profile Picture
    4,974 Moderator on at
    Re: Download CSV from button in email

    @liesbeth 

    Well contains only returns true or false. You’ll probably want to use a Split expression or two to isolate the url using some of the characters surrounding it in the html.

  • liesbeth Profile Picture
    9 on at
    Re: Download CSV from button in email

    Thank you @takolota 

    I was successfully able to parse out my URL from the email body and when copy/pasting the result in the browser, the download is automatically initiated.

    However, when I perform a GET request with this URL, I get an redirection error message (302) and I don't understand why. Would you have any idea?

     

    Many thanks in advance

     

    liesbeth_0-1661508453710.png

     

  • Verified answer
    takolota1 Profile Picture
    4,974 Moderator on at
    Re: Download CSV from button in email

    @liesbeth 

     

    I’m not sure you can get an API url from that, it’s just a download link.

     

    As I suggested earlier, you should be able to use the OneDrive Upload from url action for this case.

    https://youtu.be/K3vyIBe-JlI

  • Nabz Profile Picture
    3 on at
    Re: Download CSV from button in email

    Hi,

    I am in a similar situation, where I have extracted the url from the email body but when I am using upload file from url and giving the path its not saving even though the flow runs successfully. If i do a manual trigger and use the extracted url to pass as an input to upload file from url it works perfectly fine. The destination is the same. Can you please help me understand why this would happen.

  • takolota1 Profile Picture
    4,974 Moderator on at
    Re: Download CSV from button in email

    @Nabz 

     

    You may want to post a new question on this & link to this thread.

    That way more community members may respond.

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard