Unzip and Upload SharePoint List Attachments to Document Library Using Power Automate

Unzip and Upload SharePoint List Attachments to Document Library Using Power Automate

Organizations often receive ZIP files as attachments in SharePoint Lists. Instead of manually downloading, extracting, and uploading files to a document library, Power Automate can automate the entire process.

This approach improves efficiency, reduces manual effort, and ensures documents are stored in a centralized SharePoint Document Library for easier management and collaboration.

Business Scenario

Users upload ZIP files as attachments to a SharePoint List item. Power Automate automatically:

Flow Overview

Step 1: Trigger the Flow

Use the SharePoint trigger:

When an item is created or modified

Step 2: Get Attachments

Retrieve the attachment details and content from the SharePoint List item.

Get Attachments

Get Attachment Content

Step 3: Extract ZIP File

Use an unzip connector or ZIP extraction action available in your environment.

Extract Archive to Folder

OR

Extract ZIP Contents

The action returns all files contained within the ZIP archive.

Step 4: Upload Files to Document Library

Loop through each extracted file and create it inside the target SharePoint Document Library.

Apply to Each

Create File

Map the extracted file name and content to the Create File action.

Important: Ensure the ZIP extraction action supports the file size of your uploaded archives. Large ZIP files may require premium connectors or Azure-based processing.

Common Use Cases

Benefits

Best Practices

Key Takeaways