Camunda Cloud icon

Camunda Cloud

Interact with Camunda Cloud

Actions4

Process Instance → Create

AI-generated

Overview

This node allows you to create a new process instance in Camunda Cloud by specifying the BPMN Process ID and any variables required for the process. It is useful when you want to programmatically start workflow instances in Camunda Cloud from within an n8n workflow, such as automating business processes, orchestrating microservices, or integrating external systems with your BPMN workflows.

Practical examples:

  • Automatically starting an approval process when a new record is created in a CRM.
  • Triggering a document review workflow after receiving a file upload.
  • Initiating order fulfillment processes based on e-commerce events.

Properties

Name Type Meaning
BPMN Process ID String Identifier of the BPMN process definition to instantiate.
Variables (JSON) JSON Key-value pairs of variables to pass to the new process instance.

Output

The output is a JSON object containing information about the newly created process instance. The structure typically includes:

{
  "processInstanceKey": "<unique-instance-key>",
  "bpmnProcessId": "<process-id>",
  "version": <number>,
  "processDefinitionKey": "<definition-key>"
}
  • processInstanceKey: Unique identifier for the created process instance.
  • bpmnProcessId: The BPMN process ID used.
  • version: Version number of the process definition.
  • processDefinitionKey: Internal key for the process definition.

Dependencies

  • External Service: Requires access to Camunda Cloud (SaaS Zeebe).
  • API Credentials: Needs clientId, clientSecret, clusterId, and clusterRegion for Camunda Cloud API (provided via n8n credentials named camundaCloudApi).
  • Node.js Packages: Uses zeebe-node for communication with Camunda Cloud and uuid for generating unique message IDs (though not directly relevant for this operation).

Troubleshooting

Common Issues:

  • Invalid Credentials: If the provided Camunda Cloud credentials are incorrect or missing, the node will throw an authentication error.
  • Malformed Variables: If the "Variables (JSON)" property contains invalid JSON, parsing will fail and an error will be thrown.
  • Nonexistent BPMN Process ID: If the specified BPMN Process ID does not exist in the target Camunda Cloud cluster, the process instance creation will fail.

Error Messages and Resolutions:

  • "Unexpected token ... in JSON at position ...": Indicates malformed JSON in the "Variables (JSON)" field. Ensure the input is valid JSON.
  • "Not authorized" or similar: Check that the Camunda Cloud credentials are correct and have sufficient permissions.
  • "No process found for BPMN process id": Verify that the BPMN Process ID exists and is deployed in the Camunda Cloud environment.

Links and References

Discussion