Create triggers to filter events by webhook
You can create a trigger for filtering custom events that are generated for webhook messages in Genesys Cloud. These events are generated when the Genesys Cloud webhook for events integration receives webhook invocations at the invocation URL specified in the integration configuration.
When you create a trigger for a webhook message, select the following options:
- The topic name
v2.integrations.inbound.webhook.{id}.invocation
from the list. - The workflow to initiate for the event.
- The condition that identifies the webhook message. For example, use the
Webhookid
that you got when you added the Webhook for Event integration.
This image shows an example of the trigger details for Webhook events:
The following is an example format of the Webhook payload:
{ "webhookId": "93f59079-9d26-49b1-bbb7-83630b85a489", "webhooksInvocation": { "body": { "someKey": "someValue", "someArray": ["a", "e", "i", "o", "u"], "someObject": { "nested": "property" } }, "headers": { "accept": ["*/*"], "accept-encoding": ["gzip, deflate, br"], "cloudfront-forwarded-proto": ["https"], "cloudfront-is-desktop-viewer": ["true"], "cloudfront-is-mobile-viewer": ["false"], "cloudfront-is-smarttv-viewer": ["false"], "cloudfront-is-tablet-viewer": ["false"], "cloudfront-viewer-ash": ["1xxx1"], "cloudfront-viewer-country": ["US"], "content-length": ["130"], "content-type": ["application/json"], "host": ["api.inntca.com"], "inin-correlation-id": ["562af708-6f7f-xxxx-a27b-146b27d5xxxx"], "my-header": ["my-value"], "user-agent": ["PostmanRuntime/7.42.0"], "via": [ "1.1 8770cedbbb1c2feb157dc67ce83fe00c.cloudfront.net (CloudFront)" ], "x-amz-cf-id": [ "g2LedL9Rtfu_rkCCxxxx9_07UV2jgr4lGvrnqWwnrJf1lH3uYu7Q==" ], "x-amzn-trace-id": ["Root=1-67f8xxxx-074dc1775c69e6c396073c4"], "x-forwarded-for": ["27.251.30.213, 15.158.35.16"], "x-forwarded-port": ["443"], "x-forwarded-proto": ["https"] }, "query": { "abc": ["123"], "foo": ["bar"] } }, "invocationTime": "2025-04-10T20:21:16.825Z" }
In the trigger, use a JSON Path expression like $.body.{{foo}}
with an operator that contains or equals the value and allows the trigger to filter based on the content of the webhook message. As in the example payload, when $.body.someKey
contains someValue
, the match criteria is satisfied and the trigger invokes the configured workflow.
To access the someKey
attribute within the webhook invocation body, you must use the expression similar to ToString(Flow.jsonData.webhooksInvocation.body.someKey)
in the Architect. This function first parses the JSON of the webhook message. Then, it navigates into the body element to get the someKey
attribute for use within the current flow.