Folder Worker
Last updated
Last updated
This worker automates the file import process. It allows parameterization such as filters, monitoring time, specific folders, and more, in addition to integrating with external services via API.
We use the for authentication with external client applications.
To find out how you can obtain your own Client ID / Client Secret pair, check the section.
Head to the screen and click the Import button, then the Folders tab.
Before using the worker, ensure that the executable is available on your system.
Download the appropriate executable for your operating system.
To check available options, open a terminal and run:
The basic command structure is:
Minimal example:
Below are all available options:
--client-id
The unique identifier for authentication with external services.
Required
--client-secret
The secret key associated with the client ID for secure authentication.
Required
--tenant-id
The unique identifier of the tenant.
Required
--workspace-id
The unique identifier of the workspace.
Required
--api-url
Optional
--tus-url
Optional
--filters
Filters applied when monitoring files (e.g., `*.pdf`).
Optional
--action
Action to perform on files: Move
or Remove
. Default is Remove
.
Optional
--folder
The directory path where files should be monitored for changes or additions. Defaults to the current directory where the command is executed or the value provided (e.g., /path/to/watch).
Optional
--destination-folder
Directory where files will be moved if --action
is Move
. Required if Move
.
Required if --action
is Move
--include-subdirectories
Whether to include subdirectories. Default is false
.
Optional
--delay
Delay in milliseconds between file checks (minimum: 30,000 ms, maximum: 300,000 ms). Default is 30,000 ms
.
Optional
--help
Displays this help message.
Run with basic credentials
Monitor PDF and JPG files
Monitor a specific folder for PDF and JPG files every 30 seconds and move them to another folder
Error: "Filters must be provided"
Cause: The --filters
option is missing.
Solution: Ensure that a valid filter is provided via command-line argument or configuration.
Error: "Invalid delay value"
Cause: The --delay
value is outside the allowed range.
Solution: The delay must be between 30,000 ms (30 seconds) and 300,000 ms (5 minutes).
Error: "Invalid action type"
Cause: The --action
value is not Move
or Remove
.
Solution: Ensure that the action is correctly set as Move
or Remove
.
Error: "Destination folder required when action is Move"
Cause: The --destination-folder
is missing when --action Move
is used.
Solution: Provide a valid destination folder via command-line argument or configuration.
Error: "API Base URL must be provided"
Cause: The --api-url
is missing.
Solution: Ensure the API base URL is included in the command-line arguments.
Error: "TUS Base URL must be provided"
Cause: The --tus-url
is missing.
Solution: Provide a valid TUS upload service URL.
Error: "Client ID is required"
Cause: The --client-id
is missing.
Solution: Ensure the client ID is correctly specified in the command.
Error: "Client Secret is required"
Cause: The --client-secret
is missing.
Solution: Provide a valid client secret.
Error: "Tenant ID must be greater than zero"
Cause: The --tenant-id
is missing or set to zero.
Solution: Ensure the tenant ID is a positive integer.
Error: "Workspace ID must be greater than zero"
Cause: The --workspace-id
is missing or set to zero.
Solution: Provide a valid workspace ID greater than zero.
The URL endpoint for integration with the processing worker, facilitating external service communication. Default value: . Contact support for changes.
The URL endpoint for integration with the processing worker, facilitating external service communication. Default value: . Contact support for changes.