{"product_id":"alertmanager-to-slack-pagerduty-with-gpt-4-1-rca-n8n","title":"Alertmanager to Slack \u0026 PagerDuty with GPT-4.1 RCA n8n","description":"\u003ch3\u003eTurn Prometheus Alertmanager alerts into actionable Slack + PagerDuty notifications—powered by GPT-4.1 RCA\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003en8n automation workflow\u003c\/strong\u003e receives \u003cstrong\u003eAlertmanager webhooks\u003c\/strong\u003e, deduplicates and rate-limits incidents in \u003cstrong\u003ePostgres\u003c\/strong\u003e, generates a \u003cstrong\u003eGPT-4.1 RCA (Root Cause Analysis)\u003c\/strong\u003e using an OpenAI tool-calling agent, and routes tiered notifications to \u003cstrong\u003eSlack\u003c\/strong\u003e (plus \u003cstrong\u003eEmail\u003c\/strong\u003e and \u003cstrong\u003ePagerDuty\u003c\/strong\u003e for high\/critical or flapping events). It also creates or updates \u003cstrong\u003eClickUp\u003c\/strong\u003e incident tickets and logs pipeline health.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives Alertmanager webhooks\u003c\/strong\u003e for both firing and resolved alerts.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes key fields\u003c\/strong\u003e (fingerprint, severity, source, and affected service) and closes the related incident in \u003cstrong\u003ePostgres\u003c\/strong\u003e, notifying \u003cstrong\u003eSlack\u003c\/strong\u003e immediately when resolved.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSuppresses alert storms\u003c\/strong\u003e by checking Postgres for existing open incidents, applying a cooldown window, while still incrementing an occurrence counter.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eClassifies the alert\u003c\/strong\u003e (client-side vs backend-side) and runs a \u003cstrong\u003eGPT-4.1 RCA agent\u003c\/strong\u003e that can query client telemetry APIs, \u003cstrong\u003ePrometheus metrics\u003c\/strong\u003e, recent deployments, and a \u003cstrong\u003evector search of past incidents\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates structured JSON output\u003c\/strong\u003e from the agent; malformed results are sent to a \u003cstrong\u003edead-letter path\u003c\/strong\u003e for logging and investigation.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpserts incident records\u003c\/strong\u003e in Postgres, applies an escalation policy, sends \u003cstrong\u003eSlack\u003c\/strong\u003e plus \u003cstrong\u003eEmail\u003c\/strong\u003e and \u003cstrong\u003ePagerDuty\u003c\/strong\u003e when appropriate, and \u003cstrong\u003ecreates\/comments on ClickUp\u003c\/strong\u003e tickets.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLogs execution health\u003c\/strong\u003e to Postgres and returns a JSON response to the webhook caller.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eReduce noisy Alertmanager pages by deduplicating and rate-limiting incidents.\u003c\/li\u003e\n  \u003cli\u003eProvide engineers with fast, structured RCA summaries in Slack using GPT-4.1.\u003c\/li\u003e\n  \u003cli\u003eEscalate only high\/critical (or flapping) alerts to PagerDuty and track everything in ClickUp.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003en8n nodes\/integrations: \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003eswitch\u003c\/strong\u003e, \u003cstrong\u003ewebhook\u003c\/strong\u003e, \u003cstrong\u003eSlack\u003c\/strong\u003e, \u003cstrong\u003eClickUp\u003c\/strong\u003e, \u003cstrong\u003ePostgres\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eOpenAI tool-calling RCA agent with \u003cstrong\u003eGPT-4.1\u003c\/strong\u003e, JSON validation, and dead-letter handling.\u003c\/li\u003e\n  \u003cli\u003eRoutes tiered notifications to \u003cstrong\u003eSlack\u003c\/strong\u003e, and for high\/critical or flapping alerts to \u003cstrong\u003eEmail\u003c\/strong\u003e and \u003cstrong\u003ePagerDuty\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46001859920051,"sku":"N8N-19463","price":53.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/Khfhb7uYdifFLeGJxUCLx_ilqOL3G3.png?v=1789117798","url":"https:\/\/buyflowscripts.com\/products\/alertmanager-to-slack-pagerduty-with-gpt-4-1-rca-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}