For the complete documentation index, see llms.txt.
Skip to main content
Version: 8.9

Amazon EventBridge Webhook connector

Start a process instance, or continue a running one, when an event arrives from Amazon EventBridge.

About this connector​

The Amazon EventBridge Webhook connector is an inbound connector that exposes a webhook endpoint. Amazon EventBridge sends events to this endpoint through an API destination, which triggers your BPMN process. For example, use it to start a process instance when an EventBridge rule detects a new shipment.

You can use the connector with the following BPMN elements:

  • Start event
  • Message start event
  • Intermediate catch event
  • Boundary event
  • Receive task

To send events from your process to Amazon EventBridge, see the Amazon EventBridge connector.

Prerequisites​

To send events to the webhook, you need an Amazon EventBridge setup with an API destination that points to the webhook URL. See example of configuring Amazon EventBridge.

Use this connector​

New to using an inbound connector? Learn how to add and use this type of connector, apply element templates, use connector secrets, handle results and errors, and more.

Configuration​

Some properties apply only to specific BPMN elements. The description of these properties names the elements they apply to. All other properties apply to all elements.

Webhook configuration​

PropertyTypeRequiredDescriptionExample
Webhook methodDropdownYesThe HTTP method of the webhook: Any, Get, Post, Put, or Delete. Select Any if it isn't essential to specify a method for the webhook trigger. Any is selected by default.
Webhook IDStringYesThe ID that is part of the webhook URL. By default, it's pre-filled with a random value. See webhook activation for how the URL is built.

Authorization​

PropertyTypeRequiredDescriptionExample
Authorization typeDropdownYesThe authorization type of the webhook: None, JWT, Basic, or API key. None is selected by default, so anyone can trigger the webhook without credentials.
JWK URLStringNo, for JWTA link to the JSON Web Key (JWK) Set containing the public keys used to verify the JWT signature. Learn more about JWK.
IssuerStringYes, for JWTThe expected value of the JWT iss claim.
AudienceStringYes, for JWTThe expected value of the JWT aud claim.
JWT role property expressionStringNo, for JWTA FEEL expression to extract the roles from the JWT. These roles are checked against Required roles. For example, =if admin = true then ["admin"] else roles.
Required rolesStringNo, for JWTA list of roles to test the JWT roles against. If provided, the webhook is only triggered if the JWT contains at least one of the required roles. For example, ["admin"].
UsernameStringYes, for BasicThe username to authenticate the webhook.
PasswordStringYes, for BasicThe password associated with the username.
API keyStringYes, for API keyThe API key that must be provided in the request to authenticate the webhook.
API key locatorStringYes, for API keyA FEEL expression that extracts the API key from the request. The default is =request.headers.apikey. For example, =split(request.headers.authorization, " ")[2].

The Required column for the properties of an authorization type refers to the matching selection in Authorization type.

Activation​

PropertyTypeRequiredDescriptionExample
ConditionStringNoA FEEL condition under which the connector triggers. Leave it empty to catch all events. See the activation condition example.
Message ID expressionStringNoA FEEL expression that extracts the unique identifier of the message. Applies to message start event, intermediate catch event, boundary event, and receive task.

Activation condition example​

If an incoming Amazon EventBridge event has the following body:

{
"version": "0",
"id": "6d3d35b7-5bf2-43ec-9e55-5cfb27ad31b4",
"detail-type": "MyEvent",
"source": "custom.application",
"account": "123456789012",
"time": "2023-07-25T12:34:56Z",
"region": "us-west-2",
"resources": [],
"detail": {
"shipment": "123456789",
"status": "received"
}
}

the Condition value might look like this:

=(get value(request.body, "detail-type")="MyEvent" and request.body.detail.status="received")

This condition triggers the Amazon EventBridge Webhook connector only when the detail-type is MyEvent and the status is received.

Correlation​

PropertyTypeRequiredDescriptionExample
Correlation requiredDropdownYesIndicates whether correlation is required: Correlation not required or Correlation required. This is needed for event-based subprocess message start events. Applies to message start event only. Correlation not required is selected by default.
Correlation key (process)StringYesA FEEL expression that sets up the correlation key from process variables. Applies to intermediate catch event, boundary event, and receive task, and to message start event if Correlation required is selected.
Correlation key (payload)StringYesA FEEL expression that extracts the correlation key from the incoming message payload. Applies to intermediate catch event, boundary event, and receive task, and to message start event if Correlation required is selected.

For example, if your correlation key is defined with a process variable named myCorrelationKey, and you want to correlate by the shipment property in the event detail of the example event, your correlation key settings look like this:

  • Correlation key (process): =myCorrelationKey
  • Correlation key (payload): =request.body.detail.shipment

Output mapping​

PropertyTypeRequiredDescriptionExample
Result variableStringNoThe name of the variable to store the result of the connector in.
Result expressionStringNoA FEEL expression to map the inbound payload to process variables.

For example, given an event payload like the following:

{
"id": "6d3d35b7-5bf2-43ec-9e55-5cfb27ad31b4",
"detail-type": "MyEvent",
"source": "custom.application",
"region": "us-west-2",
"resources": [],
"detail": {
"event": "order_created",
"customer_id": "12345",
"order_total": 100.5
}
}

to extract customer_id and order_total as process variables customerId and orderTotal, the Result expression looks like this:

= {
customerId: request.body.detail.customer_id,
orderTotal: request.body.detail.order_total
}

Example of configuring Amazon EventBridge​

To configure Amazon EventBridge, follow the steps below:

  1. Go to the AWS Management Console.
  2. Set the required permissions for EventBridge by navigating to EventBridge permissions.
  3. Access Amazon EventBridge service by going to Amazon EventBridge.
  4. Select Integration > API Destination.
  5. Switch to the Connection tab.
  6. Create a new connection with the required authorization type (basic, API key, OAuth).
  7. Create a new API destination with the following information:
    • Select the previously created connection.
    • Choose the appropriate HTTP method.
    • Specify the API destination endpoint, which should be the webhook URL generated after deploying the BPMN diagram.
  8. Create a new event bus by following the Amazon EventBridge documentation.
  9. Create a rule using the API destination that you already created. Refer to the documentation for guidance.

Troubleshooting​

To learn about general error handling in Camunda, see BPMN errors and failing jobs.

Further resources​