Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API, allowing users to manage various resources within the Commanders Act platform. Specifically for the User resource and the Create User operation, it enables creating a new user in the Commanders Act system by sending the appropriate data to the API.

Common scenarios where this node is beneficial include automating user management workflows, such as onboarding new users into Commanders Act from other systems or triggering user creation based on events in your automation pipelines.

For example, you might use this node to:

  • Automatically create a new user in Commanders Act when a new employee is added to your HR system.
  • Batch-create multiple users by feeding the node with an array of user data.
  • Integrate user creation into a larger workflow that configures permissions or sends welcome emails after user creation.

Properties

Name Meaning
Query Parameters Optional additional query parameters to customize the API request. Includes fields like end, filter, page, sort, token (API token), etc. These allow fine-tuning the request but are generally not required for user creation.
Request Body JSON object containing the details of the user to be created. This should include all necessary user attributes as expected by the Commanders Act API for user creation.

Output

The node outputs the response from the Commanders Act API after attempting to create the user. The output is a JSON array where each item corresponds to the API response for each input item processed.

  • If the API returns JSON data, it will be parsed and returned as JSON.
  • If the API returns a string, the node attempts to parse it as JSON; if parsing fails, it returns the raw text.
  • If no content is returned (HTTP 204), the node outputs a status message indicating "204 No Content".
  • The output JSON structure depends on the API's response schema for user creation, typically including details about the newly created user or error information if creation failed.

The node does not output binary data.

Dependencies

  • Requires an active connection to the Commanders Act API.
  • Requires valid API credentials (an API token and site ID) configured in n8n credentials.
  • The base URL used is https://api.commander1.com/v2.
  • The node uses standard HTTP methods (POST for user creation) and expects JSON content type.

Troubleshooting

  • Missing Credentials Error: If the node throws an error about missing API credentials, ensure that the Commanders Act API credentials are properly set up in n8n.
  • Required Fields Missing: The node expects certain fields in the request body for user creation. If the API responds with validation errors, verify that all mandatory user attributes are included in the request body.
  • API Errors: Any API call failure will throw an error with the message prefixed by "Error calling Commanders Act API". Check the error message and stack trace for details.
  • Invalid JSON in Request Body: The request body must be valid JSON. Invalid JSON will cause parsing errors before the API call.
  • Unexpected Response Format: If the API returns unexpected data, the node tries to parse it as JSON or returns raw text. Ensure the API version and endpoint are correct.

Links and References

Discussion