Templates / Investigate Alertmanager incidents with GPT-4.1, ClickUp, Slack, and PagerDuty

Investigate Alertmanager incidents with GPT-4.1, ClickUp, Slack, and PagerDuty

Needs changes

by Oneclick AI Squad ✓ · 4 views · created 2026-09-08 · DevOps, AI Chatbot

Needs changes. This template uses 2 thing(s) that n8n 3.0 removes: HTTP Request Tool (legacy), AI Agent v1 (old agent modes). 2 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
HTTP Request Tool (legacy)
Tool - Analyze Logs, Tool - Analyze Recent Deployments
HTTP Request node connected to the AI Agent's Tool input
AI Agent v1 (old agent modes)
AI Agent - Incident Investigator (v1.6)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (12)

HTTP RequestOpenAI Chat ModelSimple MemoryAI AgentPostgresClickUpSlackPagerDuty

What it does

Quick overview This workflow receives Prometheus Alertmanager webhooks, uses an OpenAI-powered incident investigator agent to query logs and recent deployments, writes a root-cause analysis to Postgres, creates a ClickUp incident task, notifies a Slack channel, and pages PagerDuty for critical incidents. How it works 1. Receives a POST webhook from Prometheus Alertmanager containing the firing alert details. 2. Normalizes key fields (alert name, severity, affected service, description, start time) and derives a session ID from the alert fingerprint to keep follow-up alerts in the same investigation context. 3. Uses an OpenAI agent with session memory to investigate the incident, optionally querying your log API and your CI/CD deployment API multiple times before returning a structured RCA JSON. 4. Parses the agent’s JSON output into fields like root cause, confidence, evidence, likely deployment, severity, and recommended actions. 5. Inserts the analysis into a Postgres incidentanalyses table for audit history. 6. Creates a ClickUp task for the incident and posts a formatted summary with the ticket link to a Slack DevOps channel. 7. If the agent-assessed severity is critical, creates a PagerDuty incident to page the on-call engineer, then returns a JSON response to the original webhook caller. Setup 1. Configure Alertmanager to send alerts to this workflow’s webhook URL (POST /alertmanager-incident). 2. Add an OpenAI credential for the Chat Model (set to gpt-4.1) and ensure the agent can use it. 3. Update the two HTTP tool endpoints (logs and deployments) and add any required authentication so they can query your log store (for example Loki/ELK/CloudWatch/Sentry) and your CI/CD or release-tracking system. 4. Add Postgres credentials and create a public.incidentanalyses table with columns matching the insert (alertfingerprint, alertname, affectedservice, rootcause, confidence, evidence, likelydeployment, severity, recommendedactions, createdat). 5. Add ClickUp credentials and set the target List ID where incident tasks should be created. 6. Add Slack credentials and set the target channel (for example devops-incidents), and add PagerDuty API token credentials plus a Service ID if you want critical paging enabled.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.