Actions9
- Message Actions
- Calendar Actions
- SharePoint Actions
Overview
This node operation uploads binary data from a previous node to a specified SharePoint document library. It is useful when you want to automate the process of storing files or attachments in SharePoint directly from your workflows without manual intervention.
Typical use cases include:
- Automatically saving generated reports, images, or documents to SharePoint.
- Uploading email attachments or other binary content collected during workflow execution.
- Archiving files in SharePoint folders with options to avoid filename conflicts.
For example, after generating a PDF report in one node, you can use this operation to upload that PDF file into a specific SharePoint folder, optionally adding timestamps to filenames to prevent overwriting existing files.
Properties
| Name | Meaning |
|---|---|
| SharePoint Site | The SharePoint site where the files will be uploaded. |
| Document Library | The document library (drive) within the selected SharePoint site where files will be stored. |
| Folder Path | The path inside the document library folder where files will be uploaded (e.g., "Documents/Attachments"). |
| Overwrite Existing | Whether to overwrite files if a file with the same name already exists in the target location. |
| Add Timestamp to Filename | Option to add a timestamp suffix to the filename to avoid conflicts with existing files. |
Output
The output is an array of objects, each representing the result of uploading one binary file property. Each object contains:
binaryProperty: The name of the binary property from the input that was uploaded.originalFileName: The original filename of the uploaded file.uploadedFileName: The final filename used for the upload (may include timestamp).success: Boolean indicating whether the upload succeeded.sharePointId: The unique ID of the uploaded file in SharePoint.webUrl: The URL to access the uploaded file in SharePoint.size: Size of the uploaded file in bytes.mimeType: MIME type of the uploaded file.error(optional): Error message if the upload failed.
If the file size exceeds 4 MB, the node uses a chunked upload session to handle large files.
Dependencies
- Requires an API authentication token or API key credential configured in n8n to access Microsoft Graph API.
- The user must have appropriate permissions on the target SharePoint site and document library to upload files.
- The node depends on Microsoft Graph API endpoints for SharePoint sites, drives, and file uploads.
Troubleshooting
- No binary data found error: This occurs if the input item does not contain any binary data. Ensure the previous node outputs binary data with valid
fileNameproperties. - Missing binary data or fileName: If a binary property lacks either the actual data or the filename, the upload for that file will fail.
- Permission errors: If the API credentials lack sufficient permissions to write to the SharePoint site or drive, uploads will fail. Verify permissions and scopes granted to the API token.
- Filename conflicts: If
Overwrite Existingis false and a file with the same name exists, the upload will fail unlessAdd Timestamp to Filenameis enabled. - Large file upload issues: Files larger than 4 MB are uploaded in chunks. Network interruptions or timeouts may cause failures; retrying the workflow often helps.