Triage DevOps incidents from Slack with GPT-4.1, Prometheus, Jira and Terraform
Needs changesWhat this workflow does
This AI workflow has 23 nodes and runs on Slack events. Along the way it connects Slack, HTTP Request, Vector Store Question Answer and OpenAI Chat Model and 3 more.
How it runs
Trigger: On Slack events.
- Set - Config (Edit Fields (Set)): sets 6 fields: incidentText, slackChannel, slackThreadTs…
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 3 tools (Tool - Query Loki, Tool - Query Prometheus, Tool - RAG Search Past Incidents); memory: Window Buffer Memory
- Set - Parse Agent Output (Edit Fields (Set)): sets 1 field: parsedOutput
- Postgres: uses Postgres
- If: checks a condition and branches into true / false
- Slack: uses Slack
- Slack: uses Slack
- Wait: pauses before continuing
- If: checks a condition and branches into true / false
- Switch: routes items into 2 branches
…plus 7 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- HTTP Request Tool (legacy) in Tool - Query Prometheus, Tool - Query Loki: replace with HTTP Request node connected to the AI Agent's Tool input.
- AI Agent v1 (old agent modes) in AI Agent - Incident Investigator (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Also check Slack Trigger requires a signing secret on the Slack API credential.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| HTTP Request Tool (legacy) Tool - Query Prometheus, Tool - Query Loki | 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 (15)
- Slack Trigger
n8n-nodes-base.slackTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request Tool
@n8n/n8n-nodes-langchain.toolHttpRequest - Vector Store Question Answer Tool
@n8n/n8n-nodes-langchain.toolVectorStore - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - AI Agent
@n8n/n8n-nodes-langchain.agent - Postgres
n8n-nodes-base.postgres - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Wait
n8n-nodes-base.wait - Switch
n8n-nodes-base.switch - Jira Software
n8n-nodes-base.jira - GitHub
n8n-nodes-base.github - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview This workflow listens for incident reports in Slack, uses an OpenAI agent with tool-calling to query Prometheus, Loki, and a vector-store RAG knowledge base, logs the analysis to PostgreSQL, and—after explicit human approval—creates a Jira or…