I am trying to build a Power Automate flow with the following requirement:
When a new email arrives with a specific subject line, I need to identify the email based on a subject mapping stored in a SharePoint list.
The email does not contain a physical attachment. Instead, it contains a Download button. When the Download button is clicked, a ZIP file containing an Excel report is downloaded.
My objective is to automatically download that ZIP/Excel file and save it to a specific SharePoint folder.
Current flow:
-
When a new email arrives (V3)
-
Get Items (SharePoint list containing subject mappings and destination paths)
-
Apply to Each
-
Condition: Compare email subject with the Mail_Subject column from the SharePoint list
-
If subject matches:
Challenges:
-
The email contains a Download button instead of a file attachment.
-
I need to extract the URL behind the Download button.
-
The download URL changes in every email.
-
Once the file is downloaded, I need to save it to the SharePoint location specified in the SharePoint list.
Could anyone suggest the best approach to:
-
Extract the dynamic download URL from the email body?
-
Download the ZIP file automatically using Power Automate?
-
Save the downloaded file to SharePoint?
I have attached:
- Email screenshot
- Current flow screenshot
Any guidance or sample flow would be greatly appreciated.