Overview
This node enables file operations over the Samba (SMB2) protocol, specifically allowing users to download files from an SMB server. It connects to a remote SMB share and retrieves files by their full path, then outputs the downloaded file as binary data within the workflow.
Common scenarios include:
- Automating retrieval of documents or media files stored on a network SMB share.
- Integrating legacy file shares into modern workflows.
- Downloading configuration or log files from SMB servers for processing.
For example, you can use this node to download a report file located at /public/documents/report.pdf from your SMB server and pass it downstream in your workflow for further analysis or storage.
Properties
| Name | Meaning |
|---|---|
| Path | The full file path on the SMB server to download, e.g., /public/documents/file.txt. |
| Put Output File in Field | The name of the output binary field where the downloaded file will be stored, e.g., data. |
Output
The node outputs the downloaded file as binary data attached to each item under the specified binary property name (default is data). The binary data contains the exact contents of the downloaded file, making it available for subsequent nodes that handle binary files (e.g., upload, conversion, or saving locally).
The JSON part of the output item remains unchanged except for any error information if the download fails.
Dependencies
- Requires connection credentials to an SMB2-compatible server.
- Uses temporary local files to stream the downloaded content before attaching it as binary data.
- Depends on Node.js modules for filesystem operations and streaming.
- No additional environment variables are required beyond the SMB connection credentials configured in n8n.
Troubleshooting
- Failed to create temporary file: Indicates issues with creating a temp file locally; ensure the node has write permissions to the temp directory.
- Failed to download file: Commonly caused by incorrect file paths, insufficient permissions on the SMB share, or connectivity issues. Verify the full path is correct and accessible.
- Binary data not found: If using binary input fields in other operations, ensure the specified binary property exists.
- Use the "Continue On Fail" option to handle errors gracefully without stopping the entire workflow.
- Check SMB server settings and user permissions if access is denied.