HTTP Webhook
The HTTP Webhook Connector allows you to start a BPMN process instance triggered by external HTTP call.
Inbound Connectors are currently supported only in Camunda Platform 8 Self-Managed.
Prerequisites (Self-Managed Camunda Platform 8)​
To use the HTTP Webhook Connector, you need to download and install the latest element template with your Modeler.
Additionally, ensure there is a network connectivity between a caller and your Camunda Connectors Runtime configured to receive HTTP POST requests.
Create an HTTP Webhook Connector task​
- Start building your BPMN diagram with a Start Event building block.
- Change its template to an HTTP Webhook.
- Fill in all required properties.
- Complete your BPMN diagram.
- Deploy it to your Camunda Platform 8 instance.
Make your HTTP Webhook Connector for receiving messages executable​
To make your HTTP Webhook Connector for publishing messages executable, take the following steps:
- In the Webhook Configuration section, set the Webhook ID. This value is used to build a URL endpoint of your webhook. For example, given the
Webhook ID
value ismyWebhookPath
, the complete webhook URL endpoint will behttp(s)://<base URL>/inbound/myWebhookPath
. - (Optional) Configure HMAC authentication if required. Not recommended: leave it
disabled
to ignore HMAC verification if your use case doesn't require verification or your use case is not yet supported.
- Set the HMAC shared secret key which is used to calculate message hash. The value is defined by a webhook administrator.
- Set the HMAC header whose value contains encrypted hash message. The exact value is provided by the external caller.
- Select HMAC hash algorithm. The exact value is provided by the external caller.
- Configure Activation Condition. For example, given external caller triggers a webhook endpoint with body
{"id": 1, "status": "OK"}
, the Activation Condition value might look like=(request.body.status = "OK")
. Leave this field empty to trigger your webhook every time. - Configure Variable Mapping. For example, given external caller triggers a webhook endpoint with body
{"id": 1, "status": "OK"}
and you would like to extractid
as a process variablemyDocumentId
. In that case, the Variable Mapping might look as={myDocumentId: request.body.id}
.
Example​
Give a use-case when you need to configure a GitHub webhook with an HTTP Webhook Connector in such a way that: (1) your BPMN process starts on every opened PR, and (2) the PR URL is exposed as a process variable.
Let's say you choose mySecretKey
as a shared secret passphrase. GitHub declares that they use X-Hub-Signature-256
header for SHA-256
HMAC.
Therefore, you would need to set the following:
- Webhook ID: any unique to your cluster webhook ID. This will generate a URL to trigger your webhook. In example,
myWebhookPath
. - HMAC Authentication:
enabled
. - HMAC Secret Key:
mySecretKey
orsecrets.MY_GH_SECRET
. - HMAC Header:
X-Hub-Signature-256
. - HMAC Algorithm:
SHA-256
. - Activation Condition:
=(request.body.action = "opened")
. - Variable Mapping:
={prUrl: request.body.pull_request.url}
. - Click
Deploy
.
For GitHub, there is a simplified GitHub Webhook Connector.