Analyze Alertmanager incidents and post diagnostic reports to Mattermost
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model, Qdrant Vector Store, Embeddings Google Gemini and MCP Client and 1 more.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- SetVars (Edit Fields (Set)): sets 7 fields: MATTERMOST_HOST, MATTERMOST_CHANNEL_ID, prometheus_uid…
- PreProcessAlerts (Code): runs custom JavaScript code
- DeduplicateAlerts (Code): runs custom JavaScript code
- GetAlertRule (HTTP Request): calls an HTTP API
- ExtractRuleQuery (Code): runs custom JavaScript code
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 5 tools (K8S mcp, Github MCP, Grafana mcp, Digitalocean MCP…)
- GetAlertMessages (HTTP Request): calls an HTTP API
- FindAlert (Code): runs custom JavaScript code
- Post in thread (Mattermost): uses Mattermost
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Qdrant Vector Store
@n8n/n8n-nodes-langchain.vectorStoreQdrant - Embeddings Google Gemini
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - MCP Client Tool
@n8n/n8n-nodes-langchain.mcpClientTool - Webhook
n8n-nodes-base.webhook - HTTP Request
n8n-nodes-base.httpRequest - Mattermost
n8n-nodes-base.mattermost - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set
From the author
Overview This workflow helps automatically analyze alerts occurring in the infrastructure and suggest solutions even before the on-duty engineer sees the alert. How it work 1. Workflow receives alert from Alertmanager via Webhook. 1. The variables required…