cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
liesbeth
Regular Visitor

Download CSV from button in email

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
takolota
Super User
Super User

@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

View solution in original post

5 REPLIES 5
takolota
Super User
Super User

@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.

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/connec...')

 

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

 

@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
Regular Visitor

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

 

takolota
Super User
Super User

@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

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,532)