Route CI/CD failure alerts with OpenAI, Slack, Linear, Sheets and Gmail

Go to Workflow
0 views
Built by Avkash Kakdiya Avkash Kakdiya
Created on June 16, 2026

Description

Quick Overview
This workflow receives CI/CD failure webhooks, classifies severity by branch, uses OpenAI to generate a root-cause diagnosis and remediation, then alerts Slack, creates a Linear issue, logs the incident to Google Sheets, and emails a summary via Gmail.

How it works
Receives a POST webhook from your CI/CD system with pipeline run status and metadata.
Parses the payload to extract status, pipeline name, branch, commit details, error log, and run URL, and drops malformed events.
Filters out non-failure runs and assigns a severity level and Linear priority based on the branch.
Sends the error log and context to OpenAI to return a JSON diagnosis, remediation step, and rollback recommendation.
Posts a Slack alert to the on-call channel for Critical incidents and posts all incidents to a developer Slack channel.
Creates a Linear issue with the failure context and AI diagnosis, appends the incident to a Google Sheets log, and emails a Gmail HTML summary to the engineering lead.

Setup
Copy the workflow’s webhook URL and configure your CI/CD platform (for example GitHub Actions, GitLab CI, or CircleCI) to POST failure events to it.
Add credentials for OpenAI, Slack, Google Sheets, and Gmail, and provide a Linear API key for the Linear GraphQL request.
Replace placeholders for Slack channel IDs, Linear team ID, Google Sheets spreadsheet ID and sheet name, and the engineering lead email address.

Nodes Used (6)

Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest
OpenAI
@n8n/n8n-nodes-langchain.openAi
Slack
n8n-nodes-base.slack