Start message webhook always returns 500

Hello All,

I am using Camunda self-managed with version 8.6.9.

I am facing an issue when I tried to use the start message webhook and I added in the result expression modification in the status code returned.

I applied the solutions mentioned in this thread HTTP Webhook Error 500 when supplying a response expression - Camunda 8 Topics / Discussion & Questions - Camunda Forum, but the problem still exists even when I upgraded the Camunda version into 8.6.21

I opened the connectors logs and I found Null pointer exception is thrown

2025-08-12T06:40:01.430Z  INFO 1 --- [nio-8080-exec-5] i.c.c.r.i.w.InboundWebhookRestController : Webhook: InboundConnectorDefinition[type=io.camunda:webhook:1, tenantId=<default>, deduplicationId=<default>-Process_169t6jn--1233672396, elements=[ProcessElement[bpmnProcessId=Process_169t6jn, version=1, processDefinitionKey=2251799813705212, elementId=StartEvent_EntityCertificate, tenantId=<default>]]] failed with exception java.lang.NullPointerException: null
	at java.base/java.util.Objects.requireNonNull(Unknown Source)
	at io.camunda.connector.runtime.inbound.webhook.InboundWebhookRestController.escapeValue(InboundWebhookRestController.java:89)
	at io.camunda.connector.runtime.inbound.webhook.InboundWebhookRestController.toResponseEntity(InboundWebhookRestController.java:85)
	at io.camunda.connector.runtime.inbound.webhook.InboundWebhookRestController.buildSuccessfulResponse(InboundWebhookRestController.java:207)
	at io.camunda.connector.runtime.inbound.webhook.InboundWebhookRestController.buildResponse(InboundWebhookRestController.java:158)
	at io.camunda.connector.runtime.inbound.webhook.InboundWebhookRestController.processWebhook(InboundWebhookRestController.java:135)
	at io.camunda.connector.runtime.inbound.webhook.InboundWebhookRestController.lambda$inbound$0(InboundWebhookRestController.java:113)
	at java.base/java.util.Optional.map(Unknown Source)
	at io.camunda.connector.runtime.inbound.webhook.InboundWebhookRestController.inbound(InboundWebhookRestController.java:108)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

and this is the workflow sample
test.bpmn (6.0 KB)

and this is the curl for the initiation with the result

curl --location 'http://localhost:8085/inbound/initiate-test-workflow' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic RXN0YWJsaXNobWVudDpFU1RARGV2MTIzNA==' \
--data '{
    "requestId": "12345"
}'

Hi there! :wave:

I can see you’re experiencing a known issue with the HTTP Webhook connector in Camunda 8.6.x versions. The NullPointerException in InboundWebhookRestController.escapeValue is a documented problem related to template version mismatches and response expression handling.

Root Cause

This issue occurs due to incompatibilities between the connector template version and the runtime expectations in Camunda 8.6.x, particularly when using response expressions.

Solution

Based on the forum discussions you referenced and similar cases, here’s the recommended workaround:

1. Update your BPMN XML manually:

  • Set the template version to 10 in your BPMN file
  • Use inbound.responseBodyExpression instead of inbound.responseExpression

Edit your BPMN XML to include:

zeebe:modelerTemplateVersion="10"

And ensure you’re using the correct property name for the response expression.

2. Verify your connector configuration:

  • Make sure you’re using the latest connector template for Camunda 8.6
  • Validate that your FEEL expressions are correctly formatted
  • Ensure all referenced variables exist in the incoming request

3. Check your result expression:

Since you mentioned using result expression modification, make sure:

  • Your result expression is valid FEEL syntax
  • It only references available data (like request.body.requestId)
  • No null values are being passed to the escapeValue method

If the workaround doesn’t work:

This appears to be a bug in Camunda 8.6.x versions. If the above solution doesn’t resolve your issue, I’d recommend:

  1. Filing a bug report at: GitHub · Where software is built
  2. Include your BPMN file, connector configuration, and the full stack trace
  3. Mention this is related to the InboundWebhookRestController.escapeValue NullPointerException

References:

Let me know if you need help implementing these changes or if the issue persists after trying the workaround!