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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate: Extrac...
Power Automate
Suggested Answer

Power Automate: Extract Download URL from Email Body and Save ZIP File to SharePoint

(1) ShareShare
ReportReport
Posted on by 4

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:

  1. When a new email arrives (V3)

  2. Get Items (SharePoint list containing subject mappings and destination paths)

  3. Apply to Each

  4. Condition: Compare email subject with the Mail_Subject column from the SharePoint list

  5. If subject matches:

    • Use Compose to retrieve the email body

    • Send the Compose output to myself to inspect the email content and understand how the Download button URL is stored

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:

  1. Extract the dynamic download URL from the email body?

  2. Download the ZIP file automatically using Power Automate?

  3. Save the downloaded file to SharePoint?

I have attached:

  • Email screenshot
  • Current flow screenshot

Any guidance or sample flow would be greatly appreciated.

PA FLow.png
PowerAutomate.png

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,653 on at

    Hi @Narayandatta99,

    Thanks for posting the issue here. Let's follow these steps to achieve your goal. I assumed you are well aware of triggers and actions. If you get stuck in any steps let me know.

     

    1. Trigger on New Email Arrival: Use the "When a new email arrives" trigger filtered by the specific subject line.
    2. Lookup Subject Mapping in SharePoint: Query your SharePoint list to map the email subject to the corresponding metadata or folder path.
    3. Extract Download URL from Email Body: Parse the email body (HTML) to extract the dynamic download URL behind the Download button. Use expressions or HTML parsing techniques to locate the anchor tag or button link.
    4. Download the ZIP/Excel File: Use the HTTP action in Power Automate to call the extracted URL and download the file content. Ensure the URL is accessible and handle any required authentication.
    5. Save the File to SharePoint: Use the "Create file" action to save the downloaded file content to the SharePoint folder specified in your SharePoint list.
     
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • Narayandatta99 Profile Picture
    4 on at
    Thank you for your response!.
     
    I am facing a challenge at the unzipping step. Could you please help us with either of the following:
     
    1. Is there a direct download URL available for the Excel (.xlsx) file inside the ZIP, without needing to download the ZIP itself?
       - For example, something like: .../Data.xlsx instead of .../DataReporting.zip
    2. If a direct Excel URL is not available, could you share any guidance or documentation on how we can programmatically extract the Excel file from the ZIP in an automated flow?
  • chiaraalina Profile Picture
    2,425 Super User 2026 Season 1 on at
     
    Can you upload the screenshots directly here? It would be helpful.
    Thanks!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard