Overview
This node enables interaction with Samba (SMB) file shares using NTLMv2 authentication. It allows users to either list files in a specified folder on a Samba share or upload files to it. This is particularly useful for automating workflows that involve accessing or managing files on Windows network shares or NAS devices supporting SMB protocol.
Common scenarios:
- Automatically retrieving directory listings from a shared network drive for processing or monitoring.
- Uploading generated reports, logs, or other binary data directly to a Samba share as part of an automated workflow.
- Integrating legacy file shares into modern automation pipelines without manual intervention.
Practical example:
- A user configures the node to list files in a shared folder on a company’s file server every hour, then processes new files downstream.
- Another user uploads backup files generated by n8n workflows directly to a Samba share for centralized storage.
Properties
| Name | Meaning |
|---|---|
| Host oder IP-Adresse | The hostname or IP address of the Samba server to connect to. |
| Freigabe | The name of the Samba share (network share) to access. |
| Domain | Optional domain name for authentication (can be empty if not needed). |
| Benutzername | Username for authenticating to the Samba share. |
| Passwort | Password corresponding to the username for authentication. |
| Ordnername | Folder path inside the share to operate on. If empty, the root directory of the share. |
| Dateioperation auswählen | Operation to perform: either "Dateiliste ausgeben" (list files) or "Datei hochladen" (upload file). |
| Binary Feld | (Only for upload operation) Name of the binary property containing the file data to upload. Defaults to "data". |
| Überschreiben? | (Only for upload operation) Boolean flag indicating whether to overwrite existing files. |
Output
For listing files (
Dateiliste ausgeben):- Outputs an array of JSON objects, each representing a file or folder in the specified directory.
- Each object contains:
Name: File or folder name.Pfad: Relative path within the share (prefixed with backslashes).Erstellt: Creation date/time formatted asdd.MM.yyyy, HH:mm.Geändert: Last modified date/time formatted similarly.Größe: Size of the file in human-readable format (e.g., "1.23 MB") or"Ordner"if it is a directory.
For uploading files (
Datei hochladen):- Outputs JSON objects indicating success status and metadata for each uploaded file:
success: Alwaystrueif upload succeeded.remotePath: Full remote path where the file was saved.size: Size of the uploaded file in bytes.mimeType: MIME type of the uploaded file.fileName: Name of the uploaded file.overwritten: Boolean indicating if an existing file was overwritten.
- Outputs JSON objects indicating success status and metadata for each uploaded file:
Binary data is handled only during upload, where the node reads binary content from the specified input field.
Dependencies
- Requires access to a Samba (SMB) server supporting NTLMv2 authentication.
- Needs valid credentials (host, share, domain, username, password) to connect.
- No external API keys are required beyond these connection details.
- The node internally uses a helper function to establish the SMB connection.
- No additional environment variables or n8n configurations are necessary beyond standard credential management.
Troubleshooting
Common issues:
- Connection failures due to incorrect host, share name, or credentials.
- Permission denied errors if the user lacks read/write rights on the share.
- Upload errors if the binary data field is missing or incorrectly specified.
- File already exists error when uploading without overwrite permission.
Error messages and resolutions:
Binary "<field>" fehlt.— The specified binary property is missing in the input data. Ensure the binary field name matches and the input contains binary data.Datei existiert bereits! <path>— The target file already exists and overwrite is disabled. Enable overwrite or rename the file.- SMB connection errors — Verify network connectivity, correct host/share names, and valid credentials.
- Path formatting issues — Ensure folder paths do not start or end with slashes/backslashes; the node trims these automatically but malformed paths may cause errors.