Skip to content

Connect Camunda to ChatGPT: Orchestrate Workflows & Resolve Incidents

Learn how to connect Camunda to ChatGPT using a managed MCP server. Automate process instances, resolve workflow incidents, and orchestrate BPMN directly from chat.

Uday Gajavalli Uday Gajavalli · · 10 min read
Connect Camunda to ChatGPT: Orchestrate Workflows & Resolve Incidents

If you need to connect Camunda to ChatGPT to orchestrate business workflows, debug failed process instances, or automate human task assignments, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's JSON-RPC tool calls and Camunda's complex REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL in seconds.

If your team uses Claude, check out our guide on connecting Camunda to Claude or explore our broader architectural overview on connecting Camunda to AI Agents.

Giving a Large Language Model (LLM) read and write access to an enterprise orchestration engine like Camunda 8 is a massive engineering challenge. You have to handle eventually consistent search endpoints, complex asynchronous batch operations, and highly specific hierarchy mappings between process instances, element instances, and incidents. Every time you update a BPMN model or deploy a new decision table, your LLM needs to understand the new schema.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Camunda, connect it natively to ChatGPT, and execute complex orchestration workflows using natural language.

The Engineering Reality of the Camunda API

A custom MCP server is essentially a self-hosted API middleware layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against Camunda's architecture is exceptionally painful.

Camunda 8 is powered by Zeebe, a distributed workflow engine, and relies on an exporter (typically Elasticsearch or OpenSearch) for historical and search queries. If you decide to build a custom MCP server for Camunda, you own the entire integration lifecycle. Here are the specific challenges that break standard CRUD assumptions when working with Camunda:

Eventual Consistency in Search Endpoints

Because Zeebe processes commands instantly but exports data to secondary storage asynchronously, search endpoints (like /process-instances/search or /user-tasks/search) are eventually consistent. If an LLM creates a process instance and immediately tries to search for it using a unique business key, the API might return a 404 or an empty array. Your MCP server tool descriptions must explicitly instruct the LLM to expect delays or use precise processInstanceKey lookups rather than relying on immediate search visibility, otherwise the agent will hallucinate failures and attempt dangerous retry loops.

Asynchronous Batch Operations and Polling

When dealing with bulk actions—like migrating process instances or resolving incidents at scale—Camunda does not return a success confirmation immediately. Instead, endpoints like POST /process-instances/batch/migrate return a 202 Accepted with a batchOperationKey. To know if the migration succeeded, the client must poll /batch-operations/{batchOperationKey}. Standard LLMs do not inherently understand polling loops. If you build a custom MCP server, you either have to build blocking polling logic into the server itself (risking HTTP timeouts) or write highly specific prompt instructions teaching the LLM how to poll the batch status tool.

The Incident Resolution Hierarchy

You cannot simply "restart" a failed workflow in Camunda. An error creates an incident attached to a specific elementInstanceKey (a step in the BPMN), which belongs to a processInstanceKey. To resolve an incident, an agent must first query the incident to find the root cause (e.g., a missing variable or a dead job worker), fix the underlying issue via a variable update or job retry, and then call the /incidents/{incidentKey}/resolve endpoint. Mapping this multi-step, highly relational data model into a flat list of tools that an LLM can understand requires aggressive schema normalization and documentation-driven tool generation.

Generating a Camunda MCP Server with Truto

Instead of writing and maintaining a custom Node.js or Python MCP server to handle Camunda's quirks, you can use Truto to generate one instantly. Truto derives MCP tools dynamically from the integration's resource definitions and schemas, acting as a secure proxy API that handles authentication, pagination, and data normalization automatically.

Here is how to generate a Camunda MCP server.

Step 1: Connect the Camunda Account

Before you can generate a server, you need an active connection to a Camunda tenant.

  1. In the Truto dashboard, navigate to Integrated Accounts -> New Integrated Account.
  2. Select Camunda.
  3. Enter the Camunda API credentials (client ID, client secret, cluster ID, and region for Camunda SaaS, or the base URL and OAuth endpoint for self-hosted instances).
  4. Once connected, note the integrated_account_id.

Truto securely stores the credentials and handles token refreshing automatically. The LLM never sees the raw Camunda API keys.

Step 2: Create the MCP Server

You can create the MCP server via the Truto dashboard or programmatically via the API.

Method A: Via the Truto UI

  1. Navigate to the integrated account page for your Camunda connection.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Name the server (e.g., "Camunda Ops Agent").
  5. Select the desired configuration (e.g., allow read and write methods, restrict tags to process_instances and incidents).
  6. Copy the generated MCP server URL (it will look like https://api.truto.one/mcp/<token>).

Method B: Via the API If you are dynamically spinning up agents in a multi-tenant environment, you can generate MCP servers programmatically.

curl -X POST https://api.truto.one/integrated-account/$INTEGRATED_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Camunda SRE Copilot",
    "config": {
      "methods": ["read", "write"],
      "tags": ["process_instances", "incidents", "batch_operations"]
    }
  }'

The response returns a secure url. This single URL encodes the routing, the specific Camunda tenant, and the tool filters. Treat this URL like a highly sensitive credential.

Connecting the MCP Server to ChatGPT

Once you have your Truto MCP URL, you can plug it directly into ChatGPT.

Method A: Via the ChatGPT UI

  1. Open ChatGPT (requires a Pro, Plus, Business, Enterprise, or Education account).
  2. Navigate to Settings -> Apps -> Advanced settings.
  3. Toggle on Developer mode.
  4. Under MCP servers, click Add new server (or Custom connectors -> Add).
  5. Name the connector "Camunda" and paste the Truto MCP URL.
  6. Click Save.

ChatGPT will immediately handshake with the Truto endpoint, discover the permitted Camunda tools, and make them available in your chat context.

Method B: Via Manual Config File (for local/custom agents) If you are running a local agent or a framework that relies on MCP configuration files, you can use the standard SSE transport:

{
  "mcpServers": {
    "camunda": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<your-secure-token>"
      ]
    }
  }
}

Hero Tools for Camunda Orchestration

By default, Truto exposes dozens of endpoints based on the Camunda API. Because LLMs have finite context windows, we highly recommend using tags and methods filters during MCP server creation to limit the tools to exactly what your agent needs.

Here are 7 high-leverage hero tools for Camunda.

1. list_all_camunda_incidents

Search and filter incidents across your workflow engine. This is the starting point for any SRE or Ops agent tasked with keeping workflows healthy.

Usage note: Because this relies on the eventually consistent search backend, you must utilize pagination via the page.after cursor provided in the response body if dealing with massive incident backlogs.

"Check Camunda for any unresolved incidents across the 'order-fulfillment' process definition that were created in the last 2 hours. Summarize the error messages."

2. get_single_camunda_process_instance_by_id

Retrieves the exact state of a specific process instance using its processInstanceKey. Essential for debugging why a specific customer order or workflow is stalled.

"Fetch the details for process instance key 2251799813685240. Tell me what state it is currently in and if there are any active incidents attached to it."

3. create_a_camunda_process_instance

Starts a new instance of a specified process definition. You can target a process by its unique key, or simply pass the BPMN process ID and let the engine use the latest active version.

Usage note: The variables passed to this tool must match the JSON schema expected by the BPMN model. Truto automatically passes the JSON body securely to the Camunda Gateway.

"Start a new 'employee-onboarding' process instance for user john.doe@example.com. Pass his department as 'engineering' and his start date as next Monday in the variables payload."

4. camunda_incidents_resolve

Resolves a specific incident so the process instance can continue.

Usage note: Do not call this tool until the underlying issue (e.g., bad variables or unreachable external services) has been corrected. If you resolve an incident without fixing the root cause, Zeebe will immediately crash the element again and generate a new incident key.

"I just fixed the payload variable for the payment step. Go ahead and resolve incident key 6755399441021111 so the workflow can resume."

5. list_all_camunda_user_tasks

Searches for human-in-the-loop user tasks. This allows ChatGPT to act as a triage agent, finding unassigned tasks or tasks pending a specific department's approval.

"List all unassigned user tasks in the 'expense-approval' process. Group them by candidate group and show me the task priorities."

6. camunda_user_tasks_complete

Completes a user task and advances the BPMN token to the next step. You can optionally pass variables into the process instance upon completion.

"Complete the document review user task with key 4432199813680000. Submit variables marking 'approved' as true and 'reviewer_notes' as 'Looks good, all compliance checks passed.'"

7. camunda_process_instances_bulk_cancel

Cancels multiple active or suspended process instances in a single asynchronous batch operation. Essential for clearing out runaway test instances or handling massive system-level rollbacks.

"Cancel all active process instances for the 'legacy-sync' process definition that were started before yesterday. Monitor the batch operation key and let me know when it finishes."

For a complete list of all supported endpoints, schemas, and configurations, visit the Camunda integration page.

Workflows in Action

How do these tools combine to automate actual Camunda operations? Here are two real-world scenarios.

Scenario 1: SRE Incident Resolution

When a third-party API goes down, a Camunda service task will fail, generating incidents. An SRE can use ChatGPT to diagnose and recover the stalled workflows.

"We had an outage with the Stripe API for the last hour, but it is back up now. Find all incidents in the 'subscription-renewal' process, update the retry count, and resolve them."

  1. list_all_camunda_incidents: ChatGPT queries for unresolved incidents filtered by the subscription-renewal process definition.
  2. camunda_jobs_bulk_update: ChatGPT identifies the failed jobs associated with those incidents and updates their retries to 1.
  3. camunda_process_instances_bulk_resolve_incidents: ChatGPT initiates a batch operation to resolve all the incidents, triggering Zeebe to re-execute the service tasks.
  4. get_single_camunda_batch_operation_by_id: ChatGPT polls the batch operation key until the resolution is complete, then reports back to the SRE.
sequenceDiagram
    participant SRE as SRE (User)
    participant GPT as ChatGPT
    participant Truto as Truto MCP Server
    participant Camunda as Camunda 8 API

    SRE->>GPT: "Find incidents in 'subscription-renewal' and resolve them"
    GPT->>Truto: call list_all_camunda_incidents(processDefinitionId)
    Truto->>Camunda: POST /incidents/search
    Camunda-->>Truto: Return 50 incidents
    Truto-->>GPT: JSON array of incidents
    GPT->>Truto: call camunda_process_instances_bulk_resolve_incidents(filter)
    Truto->>Camunda: POST /process-instances/batch/resolve-incidents
    Camunda-->>Truto: batchOperationKey: 12345
    Truto-->>GPT: batchOperationKey: 12345
    GPT->>Truto: call get_single_camunda_batch_operation_by_id(12345)
    Truto->>Camunda: GET /batch-operations/12345
    Camunda-->>Truto: status: COMPLETED
    Truto-->>GPT: status: COMPLETED
    GPT-->>SRE: "All 50 incidents have been successfully resolved."

Scenario 2: HR Onboarding Orchestration

An HR manager wants to programmatically interact with a Camunda-driven onboarding process without leaving their chat interface.

"Start onboarding for Sarah Connor. Her email is sarah@example.com. Then check if there are any immediate IT provisioning tasks assigned to the IT group for her and assign them to me."

  1. create_a_camunda_process_instance: ChatGPT triggers the employee-onboarding process, passing Sarah's email in the variables.
  2. list_all_camunda_user_tasks: ChatGPT searches for user tasks where candidateGroup is 'IT' and the processInstanceKey matches the newly created instance.
  3. camunda_user_tasks_assign: ChatGPT assigns the discovered hardware provisioning task to the HR manager's user ID.
  4. ChatGPT replies: "Sarah's onboarding process has started. I found the 'Provision Laptop' task and assigned it to your queue."

Security and Access Control

Exposing an orchestration engine like Camunda to an LLM requires strict boundary setting. Truto's MCP servers provide several layers of access control, configured at the token level, which means you never have to trust the LLM to govern itself.

  • Method Filtering: Restrict a server to read-only operations by passing config.methods: ["read"]. If the LLM attempts to call create_a_camunda_process_instance, the MCP server outright blocks the tool execution.
  • Tag Filtering: Limit the server's scope to specific functional areas. Passing config.tags: ["user_tasks", "users"] ensures the agent can only interact with human tasks and directory data, hiding highly sensitive cluster admin tools.
  • Require API Token Auth: By setting require_api_token_auth: true, the MCP server URL alone is no longer enough to execute tools. The client must also pass a valid Truto API token in the Authorization header, preventing rogue actors from abusing leaked MCP URLs.
  • Time-to-Live (TTL): Set an expires_at timestamp when creating the MCP server. Truto's distributed edge alarms will automatically destroy the token and terminate access exactly when the TTL expires—perfect for granting temporary troubleshooting access to an external contractor.

Handling Rate Limits

When operating at scale, automating bulk Camunda operations via an AI agent can hit API rate limits. It is crucial to understand how Truto handles these constraints: Truto does not retry, throttle, or apply backoff on rate limit errors.

When the upstream Camunda API returns an HTTP 429 (Too Many Requests), Truto passes that error directly back to the calling client (ChatGPT). To help you manage throughput, Truto normalizes the upstream rate limit information into standardized headers per the IETF spec (ratelimit-limit, ratelimit-remaining, ratelimit-reset).

Because Truto does not absorb these errors, the caller (or the LLM framework's tool-calling loop) is entirely responsible for reading these headers and implementing its own retry logic and exponential backoff.

Architecting for Scale

Connecting Camunda to ChatGPT transforms how technical teams interact with workflow automation. Instead of navigating complex UIs or writing custom API scripts to bulk-resolve incidents, SREs and Process Admins can diagnose and orchestrate entire fleets of process instances using natural language.

By leveraging Truto's managed MCP servers, you eliminate the need to write custom schema parsers, maintain authentication lifecycles, or host middleware infrastructure. Truto handles the protocol translation, allowing you to deploy secure, highly scoped AI agents that interact with Camunda safely and reliably.

FAQ

Does Truto automatically handle Camunda rate limits?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. When Camunda returns an HTTP 429, Truto passes the error to the caller and normalizes the rate limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller is responsible for implementing retry and backoff logic.
Can I limit ChatGPT to only reading Camunda process instances?
Yes. When generating the MCP server in Truto, you can configure method filtering by passing ["read"] to the config.methods array. This ensures the LLM can only execute safe GET or LIST operations and blocks any destructive actions.
How does ChatGPT authenticate with the Truto MCP Server?
Truto generates a unique, cryptographically secure URL for each MCP server (e.g., https://api.truto.one/mcp/). For standard configurations, this URL alone provides routing and authentication. For higher security, you can enable require_api_token_auth to force clients to also provide a valid API token in the request header.
Why do Camunda search tools return empty results right after creating an instance?
Camunda 8 search endpoints are eventually consistent because data is exported asynchronously from the Zeebe engine to a secondary store (like Elasticsearch). AI agents must be instructed to either wait a few seconds before searching or rely on exact processInstanceKey lookups rather than broad search filters.

More from our Blog