AutomationFlowsEmail & Gmail › Workflow Error Logging and Alerts with Google Sheets and Gmail

Workflow Error Logging and Alerts with Google Sheets and Gmail

ByBilly Christi @billy on n8n.io

This workflow creates a comprehensive error monitoring system for your n8n instance by automatically capturing workflow failures, logging them to Google Sheets, and sending immediate email notifications.

Event trigger★★☆☆☆ complexity7 nodesError TriggerGoogle SheetsGmail
Email & Gmail Trigger: Event Nodes: 7 Complexity: ★★☆☆☆ Added:

This workflow corresponds to n8n.io template #7876 — we link there as the canonical source.

This workflow follows the Error Trigger → Gmail recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "id": "1e555304-74ad-4592-ac4e-153de85cf8a2",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        500,
        120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d976a355-76d6-4a02-bf39-4f1dba37049c",
      "name": "Google Sheets - Create Error Log",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        760,
        20
      ],
      "parameters": {
        "columns": {
          "value": {
            "Log": "={{ $json.execution.error.stack }}",
            "Node ID": "={{ $json.execution.id }}",
            "Node Name": "={{ $json.execution.lastNodeExecuted }}",
            "Timestamp": "={{ new Date($json.execution.error.timestamp).toISOString() }}\n",
            "Workflow ID": "={{ $json.workflow.id }}",
            "Execution Url": "={{ $json.execution.url }}",
            "Workflow Name": "={{ $json.workflow.name }}"
          },
          "schema": [
            {
              "id": "Workflow ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Workflow ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Workflow Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Workflow Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Node Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Node Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Node ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Node ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Timestamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Execution Url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Execution Url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Log",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Log",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JprCxz5IRZzuiYs-NNkYLffQIkeTiC0sd-3CyrcOKV4/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1JprCxz5IRZzuiYs-NNkYLffQIkeTiC0sd-3CyrcOKV4",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JprCxz5IRZzuiYs-NNkYLffQIkeTiC0sd-3CyrcOKV4/edit?usp=drivesdk",
          "cachedResultName": "n8n Logs"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "505b26b0-f5fc-42b0-8629-d28b0a702ba3",
      "name": "Gmail - Send Notification",
      "type": "n8n-nodes-base.gmail",
      "position": [
        760,
        240
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "=\ud83d\udea8 n8n Workflow Error Alert\n\n\u2022 Workflow Name: {{ $json.workflow.name }}\n\u2022 Node: {{ $json.execution.error.context.nodeCause }}\n\u2022 Error Type: {{ $json.execution.error.name }}\n\u2022 Message: {{ $json.execution.error.description }}\n\u2022 Execution ID: {{ $json.execution.id }}\n\u2022 View Execution: {{ $json.execution.url }}",
        "options": {},
        "subject": "=\ud83d\udea8 n8n Error in Workflow \"{{ $json.workflow.name }}\" (Node: {{ $json.execution.error.context.nodeCause }})",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "914a92de-d844-4d82-9f58-d3aef4507bb9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 440,
        "height": 420,
        "content": "## SETUP REQUIRED\n\nWorkflow Configurations:\n- **Copy the Google Sheets structure: [Google Sheets template](https://docs.google.com/spreadsheets/d/11-vLBAKolEvaL0qQDjckHmvC1S6_hxHbgSP8CLyngSs/edit?gid=0#gid=0)**(https://docs.google.com/spreadsheets/d/11-vLBAKolEvaL0qQDjckHmvC1S6_hxHbgSP8CLyngSs/edit?gid=0#gid=0)\n- Update the Google Sheets document ID to point to your own error logging spreadsheet\n- Adjust the Gmail notification recipient email address from \"n8n_log_template@yopmail.com\" to your preferred address\n- Customize the email subject and message format according to your notification preferences\n\nRequired Credentials:\n- Google Sheets OAuth2 API Credential\n- Gmail OAuth2 Credential"
      },
      "typeVersion": 1
    },
    {
      "id": "0d8f68bf-3293-4638-8850-0249d073b1d0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        500
      ],
      "parameters": {
        "color": 4,
        "width": 780,
        "height": 300,
        "content": "## \ud83d\udea8 n8n Error Logging to Google Sheets with Gmail Alerts\n\nWhat This Template Does:\n\n- Automatically triggers whenever any workflow in your n8n instance encounters an error\n- Captures comprehensive error details including workflow information, node details, and execution context\n- Logs all error information to a centralized Google Sheets document for tracking and analysis\n- Sends immediate email notifications to alert you of workflow failures\n- Provides direct links to failed executions for quick troubleshooting and resolution\n- Maintains a persistent error history for pattern analysis and system monitoring"
      },
      "typeVersion": 1
    },
    {
      "id": "ca3ee63a-7b38-4b79-93b7-1c3245b41c7d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        840
      ],
      "parameters": {
        "color": 4,
        "width": 780,
        "height": 380,
        "content": "## \ud83d\udccb WORKFLOW PROCESS OVERVIEW\n\nStep 1: \ud83d\udd34 Error Trigger automatically activates when any workflow in the n8n instance fails or encounters an error\nStep 2: \ud83d\udcca Google Sheets - Create Error Log captures and stores error details in a spreadsheet with columns for:\n - Workflow ID and Name\n - Failed Node Name and ID  \n - Error Timestamp\n - Execution URL for direct access\n - Full error stack trace for debugging\nStep 3: \ud83d\udce7 Gmail - Send Notification dispatches an immediate email alert containing:\n - Workflow name and failed node information\n - Error type and description\n - Execution ID and direct link to view the failed execution\n - Formatted for quick identification and response"
      },
      "typeVersion": 1
    },
    {
      "id": "f16f0589-f6bf-4051-b237-ee2b2d29def8",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        500
      ],
      "parameters": {
        "color": 4,
        "width": 380,
        "height": 760,
        "content": "# \ud83d\udc4b Hi, I\u2019m Billy\n![My Photo](https://i.ibb.co/Gvn63Bzc/Billy-Christi-AI-Automation.jpg)\nI help businesses build **n8n workflows** & **AI automation projects**.  \nNeed help with n8n or AI Automation projects? \nContact me and let\u2019s build your automation together.\n\n\ud83d\udce9 **Email:** billychartanto@gmail.com  \n\ud83e\udd1d **n8n Creator:** [n8n.io/creators/billy](https://n8n.io/creators/billy/)\n\ud83c\udf10 **My n8n Projects:** [billychristi.com/n8n](https://www.billychristi.com/n8n)  \n\n\n\n---\n\ud83d\udca1 Feel free to get in touch if you\u2019d like help on your next automation project or if you have any feedback or thoughts to share.\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Gmail - Send Notification",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Sheets - Create Error Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow creates a comprehensive error monitoring system for your n8n instance by automatically capturing workflow failures, logging them to Google Sheets, and sending immediate email notifications.

Source: https://n8n.io/workflows/7876/ — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

This n8n workflow provides a robust error handling and notification system for your n8n workflows. When an error occurs, it automatically logs the error details to Google Sheets, sends a notification

Error Trigger, Google Sheets, Telegram +1
Email & Gmail

Sync your Google Calendar events with Google Sheets and get daily Slack summaries with meeting statistics. FEATURES:

Google Calendar Trigger, Google Sheets, Slack +3
Email & Gmail

Automate daily KPI tracking and reporting by integrating ClickUp tasks and Google Sheets lead data into a unified dashboard. This workflow computes performance metrics, analyzes sentiment, and deliver

Error Trigger, Slack, ClickUp +2
Email & Gmail

This template is designed for n8n users running workflows in production who need reliable and structured error monitoring, not just basic alerts.

Telegram, Error Trigger, Gmail +1
Email & Gmail

[](https://www.youtube.com/watch?v=jxT6XO4eUwI)

Google Sheets, Gmail, Gmail Trigger