Use CEL Expressions in Webhooks
Filter and conditionally map webhook payloads with CEL expressions.
Use CEL expressions in webhook advanced mapping conditions to filter incoming webhooks and route them based on payload content.

When to use CEL webhook filters
Use CEL expressions in webhook mappings when you need:
Payload-based routing: Route webhooks to different incident types based on payload content
Priority filtering: Only create incidents for high-priority alerts
Service filtering: Filter by service name patterns or specific services
Region-based routing: Route webhooks based on geographic region
Complex conditions: Combine multiple criteria with boolean logic
Custom field matching: Filter on custom fields from your monitoring tools
Available webhook data
All fields from the webhook payload are accessible via the Webhook namespace:
Common webhook fields (varies by source):
CEL webhook examples
Filter by priority:
Filter by environment:
Production high-priority webhooks only:
Service pattern matching:
Region filtering:
Multiple services or priorities:
Severity threshold with environment:
Metric threshold filtering:
Complex multi-condition filter:
Status-based filtering:
Tag-based filtering:
Null-safe custom field check:
Webhook payload examples with CEL
Datadog webhook filters
PagerDuty webhook filters
Prometheus AlertManager filters
New Relic webhook filters
CloudWatch webhook filters
Best practices for webhook CEL filters
1. Start with simple filters and iterate:
2. Use explicit field checks for optional fields:
3. Test filters with sample webhooks:
Send test webhooks through your integration
Verify they are filtered correctly
Check webhook processing logs
Refine conditions based on results
4. Use in for multiple values:
5. Document complex filters:
6. Use regex anchors for exact matches:
Field mapping with CEL
You can also use CEL expressions to transform webhook field values during mapping:
Extract from nested JSON:
Conditional field mapping:
Format timestamps:
Combine multiple fields:
Extract with regex patterns:
Provide default values:
Clean up extracted values:
Advanced field mapping example:
Advanced CEL functions
regex.extract()
Extract values from JSON strings or text using regular expressions.
Syntax:
Examples:
.orValue()
Provide a default value when a field is null or empty.
Syntax:
Examples:
.trim()
Remove leading and trailing whitespace from strings.
Syntax:
Examples:
regex.replace()
Replace text matching a pattern with a replacement string.
Syntax:
Examples:
Troubleshooting CEL webhook filters
Next steps
Go to Create Dynamic Content for complete CEL syntax reference and advanced patterns
Go to Ingest Alerts to learn about webhook setup and configuration
Go to Route Alerts to learn about post-webhook alert processing
Last updated
Was this helpful?