Overview
This node integrates with the Cycloid CLI to perform operations on Cycloid resources by executing CLI commands directly from n8n. It is useful for automating tasks that can be done via the Cycloid command-line interface, such as listing or creating resources like events.
In the provided configuration, the node supports two operations: "Create" and "List" on a resource called "Event". The example focuses on the "List" operation of the default resource, which runs the corresponding Cycloid CLI command to retrieve a list of events.
Practical examples include:
- Automating retrieval of event logs or configurations from Cycloid.
- Integrating Cycloid resource management into workflows without needing direct API calls, leveraging the CLI instead.
- Passing additional CLI arguments dynamically to customize the command execution.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | Additional fields to pass to the CLI command. Includes: |
| - Arguments | A string of extra arguments to append to the CLI command, allowing customization of the CLI call. |
Output
The node outputs an array of items where each item contains a json object with the following structure:
{
"command": "string", // The full CLI command executed
"env": { // Environment variables used during execution, including API URL, key, and organization
"CY_API_URL": "string",
"CY_API_KEY_": "string",
"CY_ORG": "string",
...
},
"stdout": "string", // Standard output from the CLI command execution (usually the command result)
"stderr": "string" // Standard error output from the CLI command execution (usually empty if successful)
}
This output provides detailed information about the CLI command run and its results, enabling further processing or debugging in workflows.
The node does not output binary data.
Dependencies
- Requires the Cycloid CLI installed and accessible in the environment where n8n runs.
- Needs an API key credential and related configuration (API URL and organization identifier) to authenticate CLI commands.
- Uses Node.js child process execution (
exec) to run CLI commands. - Environment variables are set dynamically for each command execution to provide authentication and context.
Troubleshooting
Common issues:
- CLI command not found or not executable: Ensure the Cycloid CLI is installed and available in the system PATH.
- Authentication failures: Verify that the API key, API URL, and organization values are correctly configured and valid.
- Invalid CLI arguments: Incorrect or malformed additional arguments may cause the CLI command to fail.
Error messages:
- Errors thrown by the CLI will be captured and either cause the node to fail or, if "Continue On Fail" is enabled, return the error alongside the input data.
- Typical errors include permission denied, invalid credentials, or syntax errors in CLI arguments.
Resolution tips:
- Double-check CLI installation and version.
- Validate all credential inputs.
- Test CLI commands manually outside n8n to ensure correctness.
- Use the "Arguments" field carefully to avoid syntax errors.