Setup & Integrations
Resolve Features
Alert Webhooks
transform any webhook payload into an alert event this flexible integration handles webhooks from monitoring systems that don't have first class integrations prerequisite check that you can access the integrations page https //app0 resolve ai/integrations in resolve ai you'll need to be an admin for your organization to visit this page and make changes 1\ in resolve, create a webhook open the integrations page https //app0 resolve ai/integrations click alert webhook click add connection add a name for your new webhook alert webhook setup click save click the name to re open the integration instance click edit click + under webhooks to create a new webhook this will show custom generate instructions, with secrets unique to this webhook note ensure you finish the instructions before closing, or you will have to create a new webhook configure your monitoring system to post to the endpoint url with the required headers bearer token either in the headers authorization bearer \<youringesttoken> as query params url?token=\<youringesttoken> configuration instructions enable integration switch the webhook on and manage webhook tokens from the post setup view post setup management alert template configuration the alert template uses template syntax to transform incoming webhook payloads the template should output valid json that matches the alertevent schema required fields your template must include these required fields id unique identifier for the alert time timestamp in iso8601 format action one of "fire", "warn", or "resolve" template context templates have access to webhook the incoming webhook payload now current timestamp in iso8601 format example template { "id" "{{ webhook id | default (webhook | hash) }}", "time" "{{ webhook timestamp | iso8601 }}", "action" "{{ webhook action | default 'fire' }}", "name" "{{ webhook name | default 'alert' }}", "summary" "{{ webhook summary | default webhook message }}", "description" "{{ webhook description }}", "sourceurl" "{{ webhook sourceurl }}", "labels" {{ webhook labels | json }}, "ishighpriority" {{ webhook priority | to boolean }}, "threshold" {{ webhook threshold | to number }} } custom filters use custom filters to transform the data you send via webhook type conversion filters to number converts values to numbers, defaults to 0 for invalid values to boolean converts values to boolean (handles "true"/"1" as true) iso8601 converts date values to iso8601 format, falls back to current time data processing filters regex extract extracts text using regex patterns json serializes values to json strings default provides fallback values for empty/null fields hash generates consistent hash values for creating alert ids date enhanced date filter with "now" keyword support filter usage example { "id" "{{ webhook alert id | default (webhook | hash) }}", "time" "{{ webhook created at | iso8601 }}", "action" "{{ webhook status | default 'fire' }}", "name" "{{ webhook title | regex extract '^\\\\\[(\[^\\\\]]+)\\\\]' | default 'alert' }}", "ishighpriority" {{ webhook severity | to boolean }}, "threshold" {{ webhook limit | to number }}, "labels" {{ webhook tags | json }} } webhook payload examples basic alert payload { "id" "alert 12345", "timestamp" "2024 01 01t12 00 00 000z", "action" "fire", "name" "high cpu usage alert", "summary" "cpu usage is 85% on production servers", "description" "alert triggered due to high cpu utilization", "sourceurl" "https //monitoring example com/alerts/12345", "labels" { "severity" "high", "team" "platform", "env" "production", "service" "web server" } } custom monitoring system payload { "alert uuid" "abc 123 def", "created" "2024 01 01t12 00 00z", "status" "triggered", "title" "\[critical] database connection pool exhausted", "message" "connection pool for production database is at 100% capacity", "priority" "1", "tags" { "environment" "production", "component" "database", "team" "backend" }, "threshold value" 100, "monitor url" "https //custom monitor com/alerts/abc 123 def" } template for custom payload { "id" "{{ webhook alert uuid }}", "time" "{{ webhook created | iso8601 }}", "action" "{{ webhook status | default 'fire' }}", "name" "{{ webhook title | regex extract '^\\\\\[(\[^\\\\]]+)\\\\]\( +)' | default webhook title }}", "summary" "{{ webhook message }}", "sourceurl" "{{ webhook monitor url }}", "ishighpriority" {{ webhook priority | to boolean }}, "threshold" {{ webhook threshold value | to number }}, "labels" {{ webhook tags | json }} } advanced configuration custom field mapping map webhook fields to specific alert properties { "id" "{{ webhook incident id }}", "time" "{{ webhook occurred at | iso8601 }}", "action" "{% if webhook state == 'open' %}fire{% elsif webhook state == 'resolved' %}resolve{% else %}warn{% endif %}", "name" "{{ webhook incident name }}", "summary" "{{ webhook description | truncate 200 }}", "attribution" { "entitykey" "{{ webhook service name }}", "confidence" {{ webhook confidence | to number }} }, "metadata" { "runbook" "{{ webhook runbook url }}", "dashboard" "{{ webhook dashboard url }}" } } conditional logic use conditionals for complex transformations { "id" "{{ webhook id }}", "time" "{{ webhook timestamp | iso8601 }}", "action" "{% case webhook severity %} {% when 'critical' or 'high' %}fire {% when 'medium' %}warn {% else %}resolve {% endcase %}", "ishighpriority" {% if webhook severity == 'critical' %}true{% else %}false{% endif %}, "labels" { {% for tag in webhook tags %} "{{ tag key }}" "{{ tag value }}"{% unless forloop last %},{% endunless %} {% endfor %} } } array processing for labels avoid this if possible, as templates with loops cannot be health checked build labels from array data using for loops { "id" "{{ webhook id }}", "time" "{{ webhook timestamp | iso8601 }}", "action" "fire", "name" "{{ webhook name }}", "labels" { {% for tag in webhook tags %} "{{ tag name }}" "{{ tag value }}"{% unless forloop last %},{% endunless %} {% endfor %} } } example webhook payload with arrays { "id" "alert 123", "timestamp" "2024 01 01t12 00 00z", "name" "high memory usage", "tags" \[ {"name" "environment", "value" "production"}, {"name" "service", "value" "web server"}, {"name" "team", "value" "platform"} ], "tagstring" "severity\ high,region\ us east 1,instance\ web 01" } troubleshooting common issues "missing required field" errors ensure id, time, and action are present in template output invalid json output verify template produces valid json syntax type conversion errors use appropriate filters for data type conversion template rendering timeouts simplify complex templates or reduce payload size debugging templates use the template validation feature during configuration (coming soon) test with sample webhook payloads (coming soon) check health check results for validation errors integration with monitoring systems the alert webhook integration can receive webhooks from various monitoring systems configure your monitoring system to send post requests to the provided webhook url with the bearer token in the authorization header supported webhook actions fire alert is triggered/active warn alert is in warning state resolve alert is resolved/cleared for monitoring systems that don't use these exact values, use template logic to map their status values to the supported actions template generation assistant use this prompt with claude to automatically generate a webhook template for your specific payload structure prompt for template generation you are an expert in creating alert webhook templates for transforming webhook payloads into alertevent format using liquidjs templating with custom filters please help me create a template based on my webhook payload \## template requirements the template uses liquidjs syntax with custom filters designed for webhook transformation \### required fields (must be included) \ `id` unique identifier for the alert \ `time` timestamp in iso8601 format \ `action` one of "fire", "warn", or "resolve" \### optional fields \ `name` alert name/title \ `summary` brief alert description \ `description` detailed alert description \ `sourceurl` link to alert source/dashboard \ `ishighpriority` boolean for priority status \ `threshold` numeric threshold value \ `labels` object with key value pairs for categorization \ `metadata` additional metadata object \ `attribution` object for linking to alert rules \### available custom filters \ `default 'fallback'` provides fallback values \ `iso8601` converts dates to iso8601 format \ `to number` converts to numbers (defaults to 0) \ `to boolean` converts to boolean \ `json` serializes to json string \ `hash` generates consistent hash for ids \ `regex extract 'pattern'` extracts text using regex \### template context \ `webhook ` access webhook payload fields \ `now` current timestamp in iso8601 format \### example template structure { "id" "{{ webhook id | default (webhook | hash) }}", "time" "{{ webhook timestamp | iso8601 }}", "action" "{{ webhook status | default 'fire' }}", "name" "{{ webhook title | default 'alert' }}", "summary" "{{ webhook message }}", "ishighpriority" {{ webhook priority | to boolean }}, "labels" {{ webhook labels | json }} } \### action mapping examples { "action" "{% case webhook status %} {% when 'resolved' or 'ok' %}resolve {% when 'warning' %}warn {% else %}fire {% endcase %}" } \## my webhook payload \<paste your webhook payload here> \## instructions 1\ analyze my webhook payload structure 2\ create a liquidjs template that maps the payload fields to alertevent format 3\ ensure all required fields (id, time, action) are present 4\ use appropriate custom filters for data type conversion 5\ include fallback values using the `default` filter where appropriate 6\ add any relevant labels from the payload 7\ if attribution fields are available, include them appropriately please provide 1\ the complete liquidjs template 2\ brief explanation of key mapping decisions 3\ any recommendations for field improvements \### usage instructions 1\ copy the prompt above 2\ paste your actual webhook payload in the designated section 3\ submit to claude for template generation 4\ test the generated template in your alert webhook integration 5\ refine as needed based on your specific requirements