{"product_id":"n8n-error-handler-claude-diagnosis-gmail-alerts","title":"n8n Error Handler: Claude diagnosis + Gmail alerts","description":"\u003ch3\u003eStop error alerts from turning into alert fatigue—while still getting instant, plain-English diagnoses\u003c\/h3\u003e\n\u003cp\u003eThis n8n Error Handler workflow catches failed executions across your monitored workflows, suppresses repeat notifications, sends detailed failure context to \u003cstrong\u003eClaude via the Anthropic Messages API\u003c\/strong\u003e for a likely cause and fix steps, and then emails a formatted diagnostic alert through \u003cstrong\u003eGmail\u003c\/strong\u003e (including a link to the failed execution when available).\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGlobal failure trigger:\u003c\/strong\u003e Runs automatically whenever an execution fails in any workflow configured to use it as the workflow’s \u003cem\u003en8n Error Workflow\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts failure details:\u003c\/strong\u003e Captures the workflow name\/ID, the failing node, the error message, and a trimmed stack trace for concise reporting.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSuppresses duplicates:\u003c\/strong\u003e Uses workflow \u003cem\u003estatic data\u003c\/em\u003e to detect repeated failures and prevents sending repeat alerts within a configurable \u003cstrong\u003ecooldown\u003c\/strong\u003e window.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAsks Claude for diagnosis:\u003c\/strong\u003e For new (non-suppressed) failures, builds a structured prompt and JSON schema and calls the \u003cstrong\u003eAnthropic Messages API\u003c\/strong\u003e to return severity, whether the issue is transient, a summary, a likely cause, and up to four fix steps.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEmail-ready formatting:\u003c\/strong\u003e Creates a readable plain-text alert email, falling back to raw error details if the AI response cannot be parsed.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends Gmail alert with context:\u003c\/strong\u003e Emails the recipient configured in the workflow settings, including repeat counts and a link to the failed execution when available.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators who need dependable error visibility across multiple n8n workflows without spamming their inbox.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers debugging production incidents with actionable, Claude-generated fix steps.\u003c\/li\u003e\n  \u003cli\u003eTeams that want consistent error reports with execution links for rapid root-cause investigation.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n logic \u0026amp; control:\u003c\/strong\u003e \u003cem\u003eif\u003c\/em\u003e, \u003cem\u003eset\u003c\/em\u003e, \u003cem\u003ecode\u003c\/em\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNotifications:\u003c\/strong\u003e \u003cem\u003egmail\u003c\/em\u003e (email alerts); includes \u003cem\u003eslack\u003c\/em\u003e and a \u003cem\u003esticky note\u003c\/em\u003e as part of the workflow components.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI diagnosis:\u003c\/strong\u003e Calls the \u003cstrong\u003eAnthropic Messages API\u003c\/strong\u003e using \u003cstrong\u003eANTRHOPIC_API_KEY\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003eSetup:\u003c\/strong\u003e Configure this workflow as the “Error Workflow” in each monitored workflow’s settings, then set the recipient email (e.g., \u003cem\u003enotifyTo\u003c\/em\u003e), cooldown duration (e.g., \u003cem\u003ecooldownMinutes\u003c\/em\u003e), and your Anthropic API key.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45758754586803,"sku":"N8N-17784","price":9.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/yxQm6B26zZyScSxrbNxlX_vAVhMaTh.png?v=1785834537","url":"https:\/\/buyflowscripts.com\/products\/n8n-error-handler-claude-diagnosis-gmail-alerts","provider":"N8N Commerce","version":"1.0","type":"link"}