top of page

From Inbox to SharePoint—Automatically Unzip, Upload and overwrite Files with Power Automate

Updated: Aug 2

Manually downloading ZIP email attachments, extracting files, and uploading them to SharePoint can be time-consuming and error-prone. What if you could automate the whole process? In this guide, I’ll walk you through a simple Power Automate flow that does exactly that. Every time you receive an Outlook email with a ZIP attachment (like a CSV report), it will automatically save the file, extract the contents, update the correct folder in SharePoint, and even clean up the old files — all without lifting a finger. No coding required!


Let's start with Power Automate steps


  1. Open Power Automate in Cloud (make.powerautomate.com) and click Create => Automated cloud flow

  2. Choose a Trigger: When a New Email Arrives (V3)


UI screen showing steps to create an automated cloud flow in Power Platform. "Create" and "When a new email arrives" options are highlighted.
Select proper trigger.
  1. Trigger: When a New Email Arrives

  2. The flow starts when a new email is received in Outlook (Office 365).

  3. It uses the trigger "When a new email arrives (V3)".

  4. You can filter by:

    • Sender (From)

    • Recipient (To)

    • Subject line

    • And make sure it only runs if there's an attachment (like a ZIP file).

✅ Important: Make sure your primary Outlook account is connected.


Flowchart and settings for email automation displayed. It shows parameters like "To," "From," and "Subject Filter."
Power Automate flow for extraction.

  1. Compose Action

  2. A Compose action is added to read the contents of the attachment.

  3. It uses the dynamic field contentBytes, which contains the ZIP file data.

  4. This data will be used to create a temporary file in the next step.


Flowchart showing email automation with steps: "When a new email arrives (V3)" and "Apply to each" leading to "Compose." Text "contentBytes" highlighted.
Compose Action: contentBytes

  1. Create File in SharePoint (SP)

  2. This step creates the ZIP file in a specific SharePoint folder.

  3. It uses the function in dynamic content:

base64ToBinary(outputs('Compose'))

to convert the file content from encoded format into binary, so it can be saved properly.

  1. You choose:

    • Site Address

    • Folder Path

    • File Name


Flowchart for creating a file in an app. Key inputs like Site Address and File Path highlighted in orange. Connected step shows email trigger.
Create File in SP
  1. Extract Folder (Unzip the File)

  2. After the file is saved, it’s automatically unzipped using the “Extract folder” action.

  3. You define:

    • Where the ZIP file is

    • Where the extracted files should go

  4. It can overwrite files if they already exist.


Flowchart showing email processing steps: start with "When a new email arrives," then "Compose," "Create file," and "Extract folder." Orange accents.
Extract Folder (.csv file)
  1. Delete the Original ZIP File

  2. Once the CSV file is extracted, the original ZIP file is no longer needed.

  3. This step deletes the ZIP file to keep things clean.

  4. It uses the file’s ID from the earlier Create File step.


Flowchart interface showing steps: email arrival, compose, create file, extract folder, delete file. Orange and blue highlights with text details.
Delete file after extraction

And that’s it! With just a few steps, your Power Automate flow is now ready to handle ZIP email attachments like a pro. This solution helps you keep your SharePoint folders clean and always updated — no more manual downloads, extractions, or uploads.

If you’re just starting with automation, this is a great example of how small workflows can make a big impact in your daily routine. Give it a try, and feel free to tweak the flow to match your exact needs!

Have questions or want to see more Power Automate tips like this? Leave a comment below or reach out — I’d love to hear how you’re using automation to make life easier. 🙌


© 2025 Excelized. All rights reserved.

bottom of page