Samba (SMB2) icon

Samba (SMB2)

Transfer files via Samba (SMB2)

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.

Typical use cases include:

  • Automating retrieval of files stored on network shares for further processing.
  • Integrating legacy file shares into modern automation workflows.
  • Downloading reports, logs, or documents from SMB servers for analysis or backup.

For example, you can configure this node to download a report file from a shared folder and then pass it to another node for parsing or sending via email.

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 JSON part of the output item remains unchanged except for adding the binary data.

  • The binary field contains the actual file content.
  • This allows subsequent nodes to access the file content directly for further processing, such as uploading elsewhere, parsing, or saving locally.

Dependencies

  • Requires connection credentials to an SMB2 server (an API key or authentication token configured in n8n).
  • Uses temporary local storage to stream the downloaded file before attaching it as binary data.
  • Relies on Node.js filesystem and streaming modules internally.

Troubleshooting

  • Failed to create temporary file: Indicates issues creating a temp file locally. Check disk space and permissions on the n8n host.
  • Failed to download file: Common causes include incorrect file path, insufficient SMB permissions, or connectivity issues. Verify the full file path and SMB credentials.
  • Binary data not found: If the binary property name is incorrect or the file was not properly downloaded, ensure the property name matches and the file exists.
  • Use the "Continue On Fail" option to handle errors gracefully and inspect error messages in the output JSON.

Links and References

Discussion