Cycloid

Basic Example Node

Actions4

Overview

This node integrates with the Cycloid CLI to perform operations on Cycloid resources. Specifically, for the Event resource and the List operation, it runs a CLI command to list events from Cycloid. This is useful when you want to retrieve and process event data from Cycloid within an n8n workflow without directly calling the API, leveraging the CLI tool instead.

Practical examples include:

  • Automating the retrieval of recent events for monitoring or auditing.
  • Feeding event data into other systems or workflows for alerting or reporting.
  • Combining event listing with other Cycloid resource operations in a single workflow.

Properties

Name Meaning
Additional Fields Additional fields to pass to the CLI command. Currently supports:
- Arguments Extra string arguments appended to the CLI command, allowing customization of the command.

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, organization)
    "CY_API_URL": "string",
    "CY_API_KEY_": "string",
    "CY_ORG": "string",
    ...
  },
  "stdout": "string",    // Standard output from the CLI command (expected to contain the list of events)
  "stderr": "string"     // Standard error output from the CLI command (if any)
}

The main data of interest will be in the stdout field, which should contain the event list as returned by the Cycloid CLI.

No binary data output is produced by this node.

Dependencies

  • Requires the Cycloid CLI installed and accessible at the expected path relative to the node (../../../dist/bin/cy).
  • Requires an API key credential for authentication with Cycloid.
  • Environment variables are set dynamically for the CLI command including API URL, API key, and organization identifier.
  • Node depends on Node.js child_process.exec to run the CLI commands.

Troubleshooting

  • Common issues:

    • CLI command not found or not executable: Ensure the Cycloid CLI is correctly installed and the path is valid.
    • Authentication errors: Verify that the API key and organization values are correct and have sufficient permissions.
    • Invalid additional arguments: Passing incorrect or malformed arguments in the "Arguments" property may cause the CLI to fail.
  • Error messages:

    • If the CLI returns an error, it will be caught and either cause the node to fail or, if "Continue On Fail" is enabled, return the error alongside the input data.
    • Errors related to environment variables or missing credentials will prevent the command from running.

To resolve errors:

  • Check the CLI installation and path.
  • Validate credentials and environment variables.
  • Review the additional arguments for correctness.
  • Enable "Continue On Fail" to handle errors gracefully during testing.

Links and References

Discussion