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:
- Detects the uploaded attachment
- Retrieves the ZIP file
- Extracts the contents
- Uploads extracted files into a SharePoint Document Library
Flow Overview
- Trigger when a SharePoint List item is created or modified
- Get attachment content
- Extract ZIP file contents
- Loop through extracted files
- Create files in SharePoint Document Library
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
- Vendor document submissions
- HR onboarding documents
- Project deliverables
- Invoice and receipt processing
- Bulk document uploads
- Compliance document management
Benefits
- Eliminates manual extraction
- Improves document management
- Reduces processing time
- Ensures centralized storage
- Supports scalable automation
Best Practices
- Validate attachment types before extraction.
- Handle extraction errors gracefully.
- Implement duplicate file checks.
- Use dedicated document libraries.
- Monitor storage usage regularly.
Key Takeaways
- Power Automate can automate ZIP file extraction.
- SharePoint attachments can be processed automatically.
- Extracted files can be uploaded directly to document libraries.
- Reduces manual document handling.
- Improves efficiency and document governance.