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 binary files to it. This is particularly useful for automating workflows that involve accessing or managing files on Windows network shares or other SMB-compatible servers.
Common scenarios:
- Automatically retrieving and processing files from a network share.
- Uploading generated reports, images, or backups to a shared folder accessible by multiple users or systems.
- Integrating legacy file shares into modern automation pipelines.
Example:
- A user configures the node to connect to a Samba share on a server, lists all files in a specific folder, and then processes those files downstream.
- Alternatively, the user uploads a binary file (e.g., a PDF report) from n8n to a designated folder on the Samba share, optionally overwriting existing files.
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. |
| Benutzername | Username for authenticating to the Samba share. |
| Passwort | Password for the given username (input is masked). |
| Ordnername | Folder path inside the share to operate in. If empty, the root directory of the share. |
| Binary Feld | (Hidden) Name of the binary property in input data containing the file to upload. Default is "data". Only relevant for upload operation. |
| Überschreiben? | Boolean flag indicating whether to overwrite an existing file when uploading. |
Output
The node outputs an array of JSON objects depending on the selected operation:
List operation:
Each item contains details about a file or folder in the target directory:Name: File or folder name.Pfad: Relative path within the share.Erstellt: Creation date formatted asdd.MM.yyyy, HH:mm.Geändert: Last modified date formatted similarly.Größe: Size in human-readable format (e.g., "1.23 MB") or "Ordner" if it is a directory.
Upload operation:
Each item confirms the upload result with fields:success: Alwaystrueif upload succeeded.remotePath: Full remote path where the file was uploaded.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.
The node does not output binary data itself; it only handles binary input for uploads.
Dependencies
- Requires access to a Samba (SMB) server supporting NTLMv2 authentication.
- Needs valid credentials (host, share, username, password, optional domain).
- No additional external services are required beyond the Samba server.
- No special environment variables are needed; all connection info is provided via node parameters.
Troubleshooting
Error:
Binary "data" fehlt.
Occurs if the specified binary property is missing in the input data during upload.
Resolution: Ensure the input item contains binary data under the configured binary field name.Error:
Datei existiert bereits! <path>
Happens when trying to upload a file that already exists and overwrite is disabled.
Resolution: Enable the overwrite option or rename the file before uploading.Connection errors or authentication failures
May occur if host, share, username, password, or domain are incorrect or inaccessible.
Resolution: Verify network connectivity and credentials.File path issues
Paths are normalized to avoid leading/trailing slashes. Incorrect folder paths may cause errors or unexpected results.
Resolution: Double-check the folder path parameter.