Overview
This node integrates with Camunda Cloud to interact with BPMN workflows. Specifically, the Message - Publish operation allows you to send messages to the Zeebe broker within Camunda Cloud. This is useful for triggering events or continuing process flows by correlating messages with running process instances.
Common scenarios include:
- Sending a message to continue a waiting process instance that listens for a specific message.
- Starting a new process instance via a start message.
- Passing variables along with the message to influence process execution.
For example, you might publish a "PaymentReceived" message with order details to notify a process instance that payment has been completed.
Properties
| Name | Meaning |
|---|---|
| Correlation Key | A string value used to correlate the message with a specific process instance variable. |
| Message Name | The name of the message to publish (required). |
| Variables (JSON) | JSON object containing variables to pass along with the message to Camunda Cloud. |
| Time To Live | Time in seconds for how long the message should be valid before expiring (required). |
Output
The output is a JSON array where each element corresponds to the result of publishing a message for each input item.
- The JSON output contains the response from Camunda Cloud's message publish API.
- If a correlation key is provided, the message is correlated to an existing process instance; otherwise, a start message is published to start a new process instance.
- No binary data is output by this node.
Example output structure (simplified):
[
{
"messageId": "uuid",
"name": "MessageName",
"correlationKey": "someKey",
"variables": { ... },
"timeToLive": 3600,
...
}
]
Dependencies
- Requires an active connection to Camunda Cloud via an API authentication credential configured in n8n.
- Uses the Zeebe Node.js client library internally to communicate with Camunda Cloud.
- Requires the
uuidpackage to generate unique message IDs.
Troubleshooting
- Invalid JSON in Variables: If the "Variables (JSON)" property contains invalid JSON, the node will throw a parsing error. Ensure the JSON syntax is correct.
- Missing Required Fields: The "Message Name" and "Time To Live" fields are required. Omitting them will cause errors.
- Correlation Key Issues: If the correlation key does not match any running process instance, the message may not be delivered as expected. Double-check the correlation key value.
- API Authentication Errors: Ensure the API credentials are correctly set up and have sufficient permissions to publish messages.
- Timeouts or Network Errors: These can occur if the Camunda Cloud service is unreachable. Verify network connectivity and service status.