Actions14
Overview
The File Upload operation for the Microsoft SharePoint n8n node allows you to upload files to a specific folder within a SharePoint site. This is useful for automating document management workflows, such as saving generated reports, archiving files, or integrating with other systems that produce documents needing storage in SharePoint.
Practical examples:
- Automatically uploading invoices or receipts generated by another system into a SharePoint document library.
- Saving user-submitted forms or attachments directly into a structured SharePoint folder.
- Migrating files from another cloud service into SharePoint as part of a data integration workflow.
Properties
Name | Meaning |
---|---|
Site ID | The identifier or name of the SharePoint site where the file will be uploaded. Options may include "Financial" (with its associated GUIDs). |
File Name | The name under which the file should be saved in SharePoint. |
Parent ID | The ID of the parent folder in SharePoint that will contain the uploaded file. |
Binary Data | Whether the file content should be taken from a binary field (true ) or as plain text (false ). |
File Content | The text content of the file to upload. Used only if "Binary Data" is set to false . |
Binary Property | The name of the binary property containing the file data. Used only if "Binary Data" is set to true . Default is "data" . |
Output
- The output is a JSON object representing the uploaded file's metadata as returned by the SharePoint API. Typical fields may include:
id
: The unique identifier of the uploaded file.name
: The name of the file.webUrl
: The URL to access the file in SharePoint.- Additional metadata provided by SharePoint about the file.
Note:
If the upload uses binary data, the node does not output binary data itself; it outputs the file metadata in JSON format.
Dependencies
- External Service: Requires access to Microsoft SharePoint.
- Authentication: Needs valid OAuth2 credentials configured in n8n for the "Microsoft Sharepoint OAuth2 API".
- n8n Configuration: Ensure the SharePoint OAuth2 credential is set up and authorized for the relevant site(s).
Troubleshooting
Common Issues:
- Missing File Name: If "File Name" is empty when uploading non-binary data, the node will throw an error:
"File name must be set!"
Resolution: Provide a value for the "File Name" property. - Invalid Parent ID: If the "Parent ID" does not correspond to a valid folder, the upload will fail.
- Incorrect Binary Property Name: If "Binary Data" is enabled but the specified binary property does not exist or is misspelled, the node will throw an error.
- Authentication Errors: If the OAuth2 credentials are missing or expired, authentication errors will occur.