Power Automate allows file uploads to SharePoint, OneDrive, Dataverse, and other cloud storage services. However, sometimes the flow fails to upload a file due to various issues.
This guide explains:
Why file upload failures happen.
How to diagnose the issue.
How to fix common file upload problems.
Step 1: Understanding Common File Upload Errors
1.1. Common Causes of File Upload Failures
Cause | Description |
---|---|
File size exceeds limit | The file is larger than the allowed upload size. |
File path too long | SharePoint and OneDrive have limits on file path length. |
Insufficient permissions | The flow does not have write access to the destination folder. |
File name contains invalid characters | Some characters are not allowed in file names (e.g., `? * ” < > |
File already exists | The destination does not allow overwriting files. |
Network or API limitations | Connectivity issues or API rate limits prevent the upload. |
Corrupt file or encoding issues | The file content may be unreadable or improperly formatted. |
Step 2: Diagnosing File Upload Failures
2.1. Check the Flow Run History
- Open Power Automate (https://make.powerautomate.com).
- Click on My Flows → Select the affected flow.
- Go to Run History → Open a failed run.
- Look for error messages such as:
File upload failed: File size exceeds limit.
cssCopyEditThe file could not be uploaded due to insufficient permissions.
- Expand the action details to see:
- File size
- File path
- Error message
Step 3: Fixing Common File Upload Errors
3.1. Fix File Size Exceeds Limit
Each storage service has file size restrictions.
Storage Service | Max File Size (Standard Plan) | Max File Size (Premium Plan) |
---|---|---|
SharePoint | 250 MB | 15 GB |
OneDrive | 250 MB | 15 GB |
Dataverse | 128 MB | 512 MB |
Power Automate Attachments | 100 MB | 150 MB |
Solutions
✅ Compress the file before uploading (ZIP format).
✅ Split large files into smaller chunks.
✅ Use Azure Blob Storage for files larger than 15 GB.
3.2. Fix File Path Too Long
SharePoint and OneDrive limit file paths to 400 characters.
Solutions
✅ Store files in a higher-level folder (e.g., use /Documents/
instead of /Sites/LongFolderName/Subfolder/
).
✅ Shorten the file name before uploading.
✅ Use the “Replace” function to trim long file names:
replace(triggerOutputs()?['body/Name'], ' ', '_')
3.3. Fix Insufficient Permissions
If the flow does not have write access, it cannot upload files.
Solutions
Check if the flow owner has permission to upload files:
- Go to SharePoint/OneDrive → Right-click the folder → Manage Access.
✅ If the flow runs under a service account, ensure it has write access.
✅ Re-authenticate the connection in Power Automate:
- Go to Data > Connections.
- Find the storage service (e.g., SharePoint).
- Click Reconnect.
3.4. Fix Invalid File Name Characters
Some characters are not allowed in file names.
Invalid Characters | Restricted In |
---|---|
`\ / : * ? ” < > | ` |
# % | SharePoint URLs |
: | Mac OS |
Solutions
✅ Use Power Automate expressions to clean file names:
replace(replace(replace(triggerOutputs()?['body/Name'], '/', ''), '*', ''), '"', '')
3.5. Fix File Already Exists Issue
If the destination folder does not allow overwriting, uploads will fail.
Solutions
✅ Enable file overwriting:
- In Power Automate, check the “Create file” action.
- Set “If file exists” to Replace.
✅ Append a timestamp to the file name to create a unique version:
concat(triggerOutputs()?['body/Name'], '_', utcNow(), '.pdf')
3.6. Fix Network or API Rate Limits
Power Automate and cloud services have request limits. If exceeded, uploads may fail.
Service | Rate Limit |
---|---|
SharePoint API | 600 requests per minute |
OneDrive API | 100 requests per minute |
Dataverse API | 1,000 API calls per hour |
Solutions
✅ Use Retry Policies in Power Automate:
- Open “Create File” action → Click Settings → Enable Retry Policy.
✅ Add a delay between uploads: - Insert a “Delay” action for 5-10 seconds between file uploads.
3.7. Fix Corrupt File or Encoding Issues
If a file is corrupt or has an incorrect format, it may fail to upload.
Solutions
✅ Check file format before uploading.
✅ Re-upload a manually saved version to test if the file is valid.
✅ Convert files to Base64 encoding before sending:
base64(triggerOutputs()?['body'])
Step 4: Preventing Future File Upload Failures
4.1. Best Practices
✅ Limit file size – Use compression and chunking for large files.
✅ Validate file paths and names – Ensure they meet SharePoint and OneDrive restrictions.
✅ Check user permissions – Ensure the flow has write access to the upload folder.
✅ Enable overwrite or versioning – Prevent duplicate file issues.
✅ Use retry policies – Handle API rate limits and network issues.
✅ Monitor flow run history – Detect file upload failures early.
4.2. Set Up Alerts for File Upload Failures
- Open Power Automate → My Flows.
- Click Edit Flow → Add a “Send an email” action after file uploads fail.
- Configure the email to alert users about failed uploads.