Actions10
- Document Actions
- Upload Actions
- Project Actions
- Generic Actions
Overview
This node operation allows uploading a document file to a specified parent folder within a repository or data source. It is designed for scenarios where users need to programmatically add documents into a structured storage system, such as a project management or document management platform.
Typical use cases include:
- Automating the upload of reports, drawings, or other files into project folders.
- Integrating external systems that generate files and need to store them in a centralized repository.
- Batch uploading multiple documents with metadata and custom properties.
For example, you might use this node to upload a PDF report named "ProjectPlan.pdf" encoded in Base64 format into a specific project folder identified by its GUID.
Properties
| Name | Meaning |
|---|---|
| Parent Guid | The unique identifier (GUID) of the parent folder where the document will be uploaded. |
| Document Name | The name of the document including its file extension (e.g., "report.pdf"). |
| File Content | The content of the file encoded in Base64 format. |
| Properties | Additional JSON object containing extra document properties to set on the uploaded document. |
| Upload Options | JSON object specifying additional options related to the upload process. |
| Options | Collection of optional settings, including: |
| - Custom Payload | Allows overriding the request body with a custom JSON payload if enabled. |
Output
The node outputs JSON data representing the result of the upload operation. This typically includes information about the uploaded document such as its ID, status, or any metadata returned by the API after successful upload.
If binary data output is supported, it would represent the uploaded file or related binary content, but based on the provided code and properties, the main output is JSON describing the upload result.
Dependencies
- Requires an API key credential or authentication token configured in n8n to authorize requests to the target service.
- The node depends on the external API endpoint that accepts document uploads, which must support receiving Base64 encoded file content and associated metadata.
- No additional external libraries beyond standard n8n workflow dependencies are indicated.
Troubleshooting
- Invalid Parent Guid: If the parent folder GUID is incorrect or does not exist, the upload will fail. Verify the GUID before running the node.
- Incorrect Base64 Encoding: The file content must be properly Base64 encoded. Improper encoding will cause the API to reject the file.
- Missing Required Fields: Ensure all required fields (Parent Guid, Document Name, File Content) are provided; otherwise, the node will throw errors.
- API Authentication Errors: Check that the API key or authentication token is valid and has sufficient permissions to upload documents.
- Custom Payload Misconfiguration: If using the custom payload option, ensure the JSON is well-formed and matches the API's expected schema.
Common error messages may include:
- "Parent folder GUID not found" – indicates the specified folder does not exist.
- "Invalid file content" – suggests issues with the Base64 string.
- "Authentication failed" – points to invalid or missing credentials.
Resolving these usually involves verifying input parameters, re-encoding files, and checking API credentials.
Links and References
- Base64 Encoding Reference
- Documentation for the target document management API (not provided here; consult your API provider)
- n8n documentation on working with files and binary data