Diagnose workflow failures with Google Gemini, Google Sheets and Slack
Quick Overview This error-handling workflow captures failures from other n8n workflows, uses Google Gemini to diagnose the cause in plain language, logs each incident to Google Sheets, and sends a detailed alert to a Slack channel with a link to the failed execution.
How it works Triggers whenever a connected n8n workflow execution fails via the workflow error trigger. Extracts key failure context such as workflow name/ID, last executed node, execution URL, and the error message/description. Sends the error context to Google Gemini and asks for a structured diagnosis including category, severity, plain-language explanation, likely cause, and an n8n-specific suggested fix. Normalizes the AI output and falls back to the raw error details if the AI response is missing or incomplete. Appends the failure and diagnosis details to a Google Sheets “Errors” tab for ongoing tracking. Posts a formatted Slack message with the diagnosis and execution link to your selected channel.
Setup Add credentials for Google Gemini (PaLM) API, Google Sheets OAuth2, and Slack OAuth2. Select your target Google Sheets document and ensure it has an “Errors” sheet/tab for appending new rows. Choose the Slack channel to receive alerts and confirm the message permissions for your Slack connection. In each workflow you want monitored, set Settings → Error Workflow to point to this workflow.
Related Templates
Track OpenAI Token Usage and AI Agent Metrics with Google Sheets Dashboard
What it does Captures token usage and cost from your AI Agent/LLM. Logs model, tokens, cost, tool use, and conversation ...
Summarize SERPBear data with AI (via Openrouter) and save it to Baserow
Who's this for? If you own a website and need to analyze your keyword rankings If you need to create a keyword report on...
Send Daily Weather Forecasts from OpenWeatherMap to Telegram with Smart Formatting
🌤️ Daily Weather Forecast Bot A comprehensive n8n workflow that fetches detailed weather forecasts from OpenWeatherMap...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments