Analyze GitLab CI job failures with GPT-5.3 and send reports to Slack
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model, HTTP Request, MCP Client and Slack.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Is job failed? (If): checks a condition and branches into true / false
- SetVars (Edit Fields (Set)): sets 3 fields: prometheus_name, loki_name, grafana_group
- Extract event data (Code): runs custom Python code
- GetJobLogs (HTTP Request): calls an HTTP API
- GetCIFile (HTTP Request): calls an HTTP API
- Merge: merges the data from its input branches
- GetLastLogLines (Code): runs custom Python code
- FormatData (Code): runs custom Python code
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 3 tools (Gitlab MCP, MCP Grafana, HTTP Request)
- Send a message (Slack): uses Slack
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 (12)
- If
n8n-nodes-base.if - Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - No Operation, do nothing
n8n-nodes-base.noOp - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Http Request Tool
n8n-nodes-base.httpRequestTool - MCP Client Tool
@n8n/n8n-nodes-langchain.mcpClientTool - Slack
n8n-nodes-base.slack - Edit Fields (Set)
n8n-nodes-base.set
From the author
Overview This workflow helps automatically analyze the causes of build failures in Gitlab CI and propose solutions without involving DevOps engineers. See detailed setup guide How it work 1. Checks whether a job crashed. 1. Gets logs of the crashed job and a…