n8n Automated Error Email Alerts with Optional GPT-4o Diagnostics
Any n8n workflow failure → automatic email alert; optional AI-generated severity and fix suggestion
- Who
- n8n users, operators, small-team developers
- You get
- Receive automatic email alerts when workflows fail, with optional AI severity level and quick resolution
Constraints
Prerequisites: accessible n8n instance; SMTP credentials; optional OpenAI API key. Import this template as an Error Workflow (or regular workflow), configure the Config node with email addresses and the AI toggle, connect the required credentials, then activate.
What they did
Author coolchandan62 published a global error handler template on the n8n marketplace. The template captures any workflow failure via Error Trigger, routes through a Config node, uses an IF node to conditionally call OpenAI for diagnosis, and sends an HTML email alert via SMTP. The email template includes workflow name, node name, run ID, error message, and optional AI-generated severity level and quick resolution.
How it went
The template is listed on n8n marketplace; the author reports it provides real-time failure detection and reduces manual log checking (author_report). No specific ROI or large-scale runtime data provided.
Worth knowing
1) This template requires n8n's Error Trigger. To use as a global Error Workflow, bind it in n8n settings; as a regular workflow, invoke it via Execute Workflow node. 2) The AI node's system prompt demands raw JSON output, but parsing relies on n8n's parseJson() function—malformed model output will leave Severity Level and Quick Resolution blank in the email. 3) The email HTML template uses inline CSS; rendering may vary across email clients. 4) This site has not tested the workflow; reproduction status is not_tested.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- Send email node: connect smtp credentials.
- Analyze Error with AI node: connect OpenAI API credentials.
Configuration to replace
- Source template is n8n public workflow #11507 (~8 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-24
Steps
Configure the Config — Set Fields node
Open the Config node and fill in: fromEmail, toEmail, emailSubject (default includes workflow name variable), and AnalyzeErrorWithAI (boolean: true to enable AI diagnosis, false for basic alerts only).
Add credentials
Add an SMTP credential in n8n and link it to the Send email node. If AnalyzeErrorWithAI is true, also add an OpenAI API credential and link it to the Analyze Error with AI node. Select model gpt-4o-mini or gpt-4o in the AI node.
Save and activate the workflow
Save the workflow and toggle it to Active. If using as a global Error Workflow, designate it in n8n settings; otherwise it can be invoked manually or by another workflow.
Test and verify
Trigger a test workflow that will fail, or wait for a natural failure. Check your inbox for the alert email. With AI enabled, the email should include Severity Level and Quick Resolution fields; with AI disabled, only basic error details appear.
Prompt you can copy
Setup guidance · Editorial suggestion。Setup assistant prompt to verify configuration completeness
This block is the prompt. Ads are never placed here.
You are setting up an n8n global error email alert workflow. Confirm in order: 1) Config node has email addresses and AnalyzeErrorWithAI toggle filled; 2) SMTP credential added (required) and OpenAI credential added (if AI enabled); 3) Workflow saved and activated; 4) Test email received. Do not proceed until each step is complete.
Fill Config node first, then credentials, then activate and test.
Source
Automated error notifications with optional GPT-4o diagnostics via email · coolchandan62 · n8n.io · 2025-12-04
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.