Skip to main content
AltFTool original, tested in n8nEngineeringDevOps

Workflow error alert by email - n8n workflow template

Silent failures are the biggest risk once automations run unattended. This is a reusable error workflow: point any of your workflows at it, and whenever one of them fails you get an email with everything needed to fix it. The Error Trigger node starts this workflow…

Written and tested by AltFTool

Starts on
App event
Nodes
3 nodes
Level
Beginner
Setup
About 5 min

Workflow preview

How this workflow runs

  1. 1

    When a workflow fails

    Starts the workflow when the Error event occurs.

  2. 2

    Format error details

    Runs custom JavaScript to transform or manipulate the data flowing through the workflow.

  3. 3

    Send alert email

    Handles the Email Send step in this workflow.

Overview and setup

How it works

Silent failures are the biggest risk once automations run unattended. This is a reusable error workflow: point any of your workflows at it, and whenever one of them fails you get an email with everything needed to fix it.

The Error Trigger node starts this workflow automatically when a linked workflow fails. A Code node reads the details n8n passes along and builds a clear subject such as [Workflow error] Nightly order sync failed at "Get orders", plus a plain-text and HTML body with the workflow name and ID, the failing node, the error message, the run mode, the time, a link to the saved execution and the stack trace. It also handles the case where a trigger fails before any execution starts.

The email is sent through any SMTP server: your own mail provider, a transactional service, or a workspace account.

Set up steps

  1. Import the workflow and open Send alert email.
  2. Create an SMTP credential (host, port, user and password from your mail provider).
  3. Set the from and to addresses, then save.
  4. In each workflow you want to watch, open Settings, choose this workflow under Error workflow and save.
  5. Activate this workflow. Recent n8n versions only call an error workflow that is active.

Customise it

  • Send the same text to Slack, Microsoft Teams or Telegram in addition to email.
  • Add an IF node to send only production failures, or to route alerts by workflow name.
  • Log each failure to a sheet to spot workflows that fail repeatedly.

n8n nodes used (3 types)

What every node does (3)
  • When a workflow fails (Error Trigger)Starts the workflow when the Error event occurs.
  • Format error details (Code)Runs custom JavaScript to transform or manipulate the data flowing through the workflow.
  • Send alert email (Email Send)Handles the Email Send step in this workflow.

FAQ

Workflow error alert by email: questions

How do I import the "Workflow error alert by email" workflow into n8n?

Copy the workflow JSON from this page, open the n8n editor, click on an empty canvas and paste with Ctrl+V (Cmd+V on macOS). You can also download the .json file and choose Import from File in the workflow menu. Save the workflow, then attach credentials before activating it.

Which nodes and credentials does "Workflow error alert by email" use?

It uses Error Trigger, Code and Email Send. Any node that connects to an external service needs your own credential — open each node after import and select or create one. Trigger, logic and transformation nodes usually need no credentials.

Can it run on n8n Cloud and on self-hosted n8n?

The workflow format is the same on both. If a node appears as unknown or outdated after import, update n8n to a recent version or, on self-hosted instances, install the required community node package. Features such as $env access are available on self-hosted instances only.

How can I customise "Workflow error alert by email"?

Start by changing the trigger (schedule, webhook or app event) and the destination nodes to match your stack — it is listed under Engineering, DevOps. Edit prompts, field mappings and filters in the relevant nodes, use expressions like {{ $json.field }} to map data, and test with a manual execution before activating.

n8n is a trademark of n8n GmbH. AltFTool is not affiliated with, endorsed by or sponsored by n8n. Community templates are credited to their creators and link to the original listing; AltFTool originals are written and tested by the AltFTool team.