Overview
This node enables file operations over the Samba (SMB2) protocol, allowing interaction with SMB shares. The Download operation specifically downloads a file from an SMB share to be used within an n8n workflow. It is useful when you need to retrieve files stored on network shares for further processing, such as data extraction, transformation, or integration with other systems.
Typical use cases include:
- Automating retrieval of reports or documents stored on a corporate file server.
- Integrating legacy SMB-based storage into modern workflows.
- Downloading configuration or data files for processing in subsequent workflow steps.
Properties
| Name | Meaning |
|---|---|
| Path | The full path of the file to download from the SMB share. Example: /public/documents/file-to-download.txt |
| Put Output File in Field | The name of the binary output field where the downloaded file will be stored. Default is data. |
Output
The node outputs the downloaded file as binary data attached to each item under the specified binary property name (default "data"). The binary data contains the exact contents of the downloaded file, making it available for downstream nodes that can process binary files (e.g., file converters, uploaders, parsers).
The JSON part of the output item remains unchanged except for the addition of this binary data field.
Dependencies
- Requires access to an SMB2-compatible file share.
- Needs proper SMB credentials configured in n8n to authenticate and connect to the SMB server.
- Uses temporary local files during download to stream the file content safely.
- Relies on Node.js standard libraries (
fs,path, streams) and helper utilities bundled with the node.
Troubleshooting
- Failed to create temporary file: Ensure the n8n environment has permission to create temporary files and sufficient disk space.
- Failed to download file: Common causes include incorrect file path, insufficient permissions on the SMB share, or connectivity issues. Verify the path is correct and accessible.
- Binary data not found: If the binary property name does not match the expected field or if the file is empty, check the input parameters.
- Cleanup errors: Temporary files are cleaned up after download; failures here usually do not affect the main operation but indicate filesystem permission issues.
If the node is set to continue on failure, errors will be added to the item's JSON under an error key instead of stopping execution.