Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API to manage event enrichments among other resources. Specifically, for the Event Enrichment - Create Event Enrichment operation, it allows users to create new event enrichment entries in the Commanders Act platform. This is useful for enhancing event data with additional context or metadata before further processing or analysis.

Typical use cases include:

  • Adding custom attributes or metadata to events collected from websites or applications.
  • Enriching raw event data with business-specific information to improve analytics and reporting.
  • Automating the creation of enriched event records as part of a data pipeline.

For example, a marketing team might use this node to automatically add campaign identifiers or user segmentation info to events captured on their website.

Properties

Name Meaning
Query Parameters A collection of optional query parameters to customize the API request. Includes options like end, filter (with subfields such as begin_date, end_date, search, etc.), granularity, include, page, sort, source, start, and token. These allow filtering, sorting, pagination, and scoping of the request.
Request Body The JSON body of the request containing the details of the event enrichment to be created. This should include all necessary fields as per the Commanders Act API specification for creating an event enrichment.

The "Query Parameters" property supports many specific keys, including but not limited to:

  • end: End date/time filter.
  • filter[begin_date], filter[end_date]: Date range filters.
  • filter[search]: Search term filter.
  • filter[segment_id]: Segment identifier filter.
  • granularity: Level of detail for returned data.
  • page: Pagination settings.
  • sort: Sorting criteria.
  • source: Source identifier.
  • start: Start date/time filter.
  • token: Authentication token or similar sensitive parameter (input masked).

Output

The node outputs the JSON response received from the Commanders Act API after creating the event enrichment. The output structure depends on the API's response but generally includes details of the newly created event enrichment record.

If the API returns a string response, the node attempts to parse it as JSON; if parsing fails, it outputs the raw text. If no content is returned (HTTP 204), the node outputs a status message indicating "204 No Content".

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Commanders Act API.
  • Needs valid API credentials (an API key/token and site ID) configured in n8n.
  • The base URL used is https://api.commander1.com/v2.
  • The node sends requests with Content-Type: application/json and Bearer token authorization headers.

Troubleshooting

  • Missing Credentials Error: If API credentials are not set or invalid, the node throws an error "Missing Commanders Act API Credentials". Ensure that the API key/token and site ID are correctly configured.
  • Required Parameter Missing: For some operations, required IDs or parameters must be provided. For example, creating event enrichment requires the request body; missing this may cause errors.
  • API Errors: If the API returns an error, the node throws a detailed error including the message and stack trace. Check the API documentation for error codes and ensure the request body and parameters conform to expected formats.
  • Parsing Response Failures: If the API returns non-JSON text unexpectedly, the node outputs raw text. Verify the API endpoint and request correctness.
  • Network Issues: Connectivity problems or incorrect base URL will cause request failures.

Links and References

Discussion