Overview
This node triggers workflows based on changes detected in a Samba (SMB2) filesystem. It monitors specific folders or files for events such as creation, deletion, or updates and initiates the workflow when these events occur. This is useful for automating processes that depend on file system changes in SMB shares, such as syncing files, processing new uploads, or auditing modifications.
Practical examples:
- Trigger a workflow when a new file is created in a shared folder to automatically process or move it.
- Monitor a specific configuration file for updates and trigger a deployment workflow.
- Detect deletions in a folder to update an inventory or notify users.
Properties
| Name | Meaning |
|---|---|
| Trigger On | Selects what to watch: currently only "Changes Involving a Specific Folder" is supported. |
| Recursive | Boolean option to watch subfolders recursively within the specified folder. |
| Folder | The path of the folder to watch for changes. Only available when "Trigger On" is set to "specificFolder". |
| Watch For | Specifies which event to trigger on within the watched folder. Options include: - File Created - File Deleted - File Updated - Folder Created - Folder Deleted - Folder Updated - Watch Folder Updated |
| Changes within subfolders won't trigger this node | Notice informing that changes inside subfolders do not trigger the node unless recursive watching is enabled. |
Note: Although the properties JSON includes options for watching specific files and any file/folder on the drive, the bundled code and provided resource/operation context indicate only "specificFolder" trigger is implemented.
Output
The node outputs JSON data representing the change event detected on the SMB share. Each output item contains a body field with details about the change, including:
changeType: Numeric code indicating the type of change (e.g., file created, deleted).- Other metadata about the changed file or folder.
The output is emitted only when the detected change matches the selected event type.
No binary data output is indicated.
Dependencies
- Requires connection credentials to access the SMB2 server (an API key or authentication token must be configured in n8n).
- Uses an internal helper module to connect and watch directories on the SMB server.
- Requires network access to the SMB share.
Troubleshooting
- Connection errors: If the node fails to connect to the SMB server, ensure the credentials are correct and the SMB server is reachable from the n8n instance.
- No triggers firing: Verify that the folder path is correct and that the selected event matches actual changes occurring on the SMB share.
- Recursive watching: By default, changes in subfolders do not trigger the node unless the "Recursive" option is enabled.
- Error messages: Errors during connection or watching will be wrapped and reported with a message like "Failed to connect to SMB server: [error details]". Check the underlying error for specifics.
Links and References
This summary is based solely on static analysis of the provided source code and property definitions.