Actions5
- File Actions
- Folder Actions
Overview
This node enables interaction with Sharepoint, specifically supporting file operations such as uploading files. The "Upload File" operation allows users to upload binary data from the workflow into a specified folder within a Sharepoint document library.
Common scenarios include:
- Automating document uploads from other systems or workflows into Sharepoint.
- Backing up files generated in n8n workflows directly to Sharepoint.
- Integrating Sharepoint as a central repository for files processed or created by automation.
For example, you could use this node to upload a PDF report generated earlier in the workflow into a specific Sharepoint folder for team access.
Properties
| Name | Meaning |
|---|---|
| Site Name or ID | Select or specify the Sharepoint site where the file will be uploaded. |
| Document Library Name or ID | Choose the document library (drive) within the selected site to upload the file into. |
| Parent Folder | Specify the target folder inside the document library where the file should be placed. Can be identified by path or ID. |
| File Name | The name to assign to the uploaded file in Sharepoint. |
| Binary Property | The name of the binary property in the input data that contains the file content to upload. Defaults to "data". |
Output
The node outputs JSON data representing the result of the upload operation. This typically includes metadata about the uploaded file such as its ID, name, and URL within Sharepoint.
If the node handles binary data, it uses the specified binary property from the input to read the file content for upload. The output JSON does not contain the binary data itself but metadata confirming the upload success.
Dependencies
- Requires an API authentication token credential for Microsoft Sharepoint (OAuth2).
- Needs network access to the Sharepoint instance.
- Uses internal helper methods to fetch sites and document libraries dynamically for dropdown options.
Troubleshooting
Common issues:
- Incorrect site or document library selection can cause failures; ensure IDs or names are valid.
- Missing or incorrect binary property name leads to no file data being uploaded.
- Insufficient permissions on Sharepoint may cause authorization errors.
Error messages:
"Unsupported operation called": Indicates an invalid operation parameter; verify the operation is set to "uploadFile".- Authentication errors: Check that the API credentials are correctly configured and have necessary scopes.
- File not found or path errors: Confirm the parent folder path or ID exists and is accessible.