Outbound webhooks are available on Team and Enterprise plans.
Prerequisites
- An existing event bus in the AWS account and region you want to publish to, or the default bus
- An AWS access key ID and secret access key for a principal that can put events on that bus
- Permission to manage webhook endpoints in the Novu environment you are configuring
- A rule and target on the bus, or CloudWatch Logs as a target, so you can observe delivered events
Required AWS permission
Batches are delivered with thePutEvents API, which is authorized by the events:PutEvents action on the destination bus. Additional permissions may be required by your own setup, for example KMS key permissions when the bus uses encryption with a customer managed key, or permissions needed to satisfy an organizational policy, service control policy, or resource policy condition.
Novu configures this connector through the embedded webhook portal. The portal collects the bus name and credentials and does not create the bus, create rules, or evaluate an IAM policy document for you.
Configuration
These are the fields collected for the Amazon EventBridge connector.
There is no webhook URL field for this connector, and no custom endpoint field. Delivery targets the bus through the AWS EventBridge API.
Event envelope
Each published event uses the following envelope:
Write EventBridge rules that match on
source and detail-type. Because the source value contains an internal application id, send a test event first and read the exact source from the received event before you pin a rule to it. If you want a stable, human-readable discriminator, set Detail type and match on that.
Transformation contract
The handler receives a batch and returns the event details to publish. The handler receives one delivery batch:input.events, an array whose length is capped by the endpoint batch sizeinput.events[].eventType, the Novu event type, for examplemessage.sentinput.events[].payload, the webhook body
payload.object is the resource type as a string, such as "message", and the resource itself is under payload.data.object. For message events, fields such as subscriberId and channel are therefore at event.payload.data.object. Other event families use different resource shapes, so guard extracted fields with defaults.
The handler must return:
payloads becomes the detail of one EventBridge event. The default template serializes each event to a JSON string:
detail bodies:
Novu example
This example keeps the Novu event type at the top level ofdetail, so rules can match on it with a content filter even though detail-type is a single configured value for the endpoint.
payloads must be strings. Returning objects instead of strings does not match the contract, so serialize with JSON.stringify before returning. The number of strings you return controls how many events are put on the bus, so you can filter a batch by returning fewer entries.
Batching and limits
EventBridge accepts at most 10 entries per request, so larger batches are automatically split across multiplePutEvents calls. Do not assume a specific endpoint batch size or wait interval. Design rules and targets to handle each event independently, because entries from the same Novu batch can be delivered in separate requests.
Configure in the Dashboard
1
Prepare the event bus
Create the bus or choose the default bus, and add a rule with an observable target so you can inspect delivered events. A CloudWatch Logs target is convenient for the first test.2
Create credentials
Create an access key for a principal that can performevents:PutEvents on the bus. If the bus is encrypted with a customer managed key, confirm the credentials can use that key.3
4
Enter connection details
Enter Event bus name, Region, Access key ID, and Secret access key. Set Detail type if you want a stable value to match in rules, and keep it within 128 characters.5
Configure the transformation
Start from the provided template and send a test before customizing. Keep every entry inpayloads a serialized string, and include any field your rules need to filter on inside detail.6
Select event types
Select the event types you want to publish. Only selected event types reach the endpoint and its transformation, so start with one event type when validating a new bus.7
Test the endpoint
Create the endpoint, open Testing, and send an example for a subscribed event type. Confirm the attempt succeeded in Logs, then inspect the rule target and compare the receiveddetail with the logged transformation output.8
Finalize the rule pattern
Using the received event, record the exactsource and detail-type values and narrow your rule pattern to them. Add content filters on detail fields if one endpoint carries several Novu event types.Verify delivery
Check the following in AWS after a successful test:- The rule target received the event, for example a new CloudWatch Logs entry appeared.
detail-typematches your configured value, orapplication/jsonwhen you left it empty.detailparses as JSON and contains the fields your targets expect.- Event counts grow per returned
payloadsentry rather than per delivered batch.
Troubleshooting
- Access denied on delivery: The credentials cannot perform
events:PutEventson this bus. Check the identity policy, the bus resource policy, and any condition that restricts the caller. - The bus is not found: Confirm the bus name or ARN is exact, and that the configured region hosts that bus. A bus in another region will not receive the events.
- Delivery succeeds but no target runs: No rule matched. Compare your rule pattern with the actual
sourceanddetail-typeon a received event, and remembersourcecontains an internal application id. - All events look the same to rules:
detail-typeis a single configured value per endpoint. Add a discriminator such as the event type insidedetailand match with a content filter. - Detail type is rejected: Keep the value within the 128 character maximum.
- Targets cannot parse the detail: Confirm each
payloadsentry is a serialized JSON string rather than an object. - Some event types never arrive: Review the endpoint’s selected event types, and test each event type separately from the Testing tab.