Templates / Analyze GitLab CI job failures with GPT-5.3 and send reports to Slack

Analyze GitLab CI job failures with GPT-5.3 and send reports to Slack

Ready for 3.0

by Sergei Byvshev ✓ · 145 views · created 2026-03-18 · DevOps, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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.

  1. Is job failed? (If): checks a condition and branches into true / false
  2. SetVars (Edit Fields (Set)): sets 3 fields: prometheus_name, loki_name, grafana_group
  3. Extract event data (Code): runs custom Python code
  4. GetJobLogs (HTTP Request): calls an HTTP API
  5. GetCIFile (HTTP Request): calls an HTTP API
  6. Merge: merges the data from its input branches
  7. GetLastLogLines (Code): runs custom Python code
  8. FormatData (Code): runs custom Python code
  9. AI Agent: runs an AI agent, with model: OpenAI Chat Model; 3 tools (Gitlab MCP, MCP Grafana, HTTP Request)
  10. Send a message (Slack): uses Slack

Services it uses

OpenAI Chat ModelHTTP RequestMCP ClientSlack

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)

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…

Excerpt from Sergei Byvshev's description on n8n.io.

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.