Log Workflow Errors to Google Sheets and Slack

Difficulty
2/10
Tags
Error TriggerGoogle SheetsSlackError HandlingNotifications
Requirements
Google Sheets API credentials configured in n8nSlack API credentials configured in n8n

The outcome: After this challenge, every error across all your n8n workflows will be automatically logged to a spreadsheet and trigger instant Slack alerts.

Why this matters: Production workflows fail silently. Without monitoring, you might not know something broke until a customer complains. A centralized error logging system catches failures across all workflows and creates a searchable audit trail for debugging.

The Error Trigger node fires whenever any workflow in your n8n instance encounters an error. By connecting it to Google Sheets and Slack, you build workflow observability that catches every failure automatically.

What you'll learn:

  • Error Trigger node - catches failures from any workflow
  • Google Sheets logging - creates a searchable error history
  • Slack notifications - instant alerts when things break

Your Task

  1. 1Copy the exercise below
  2. 2Paste into your n8n editor (Ctrl+V)
  3. 3Solve it — use hints if you get stuck
  4. 4Check the solution when done

Build an error logging workflow that captures failures from any workflow and:

  1. Add an Error Trigger node to start the workflow when any error occurs
  2. Add a Google Sheets node to log errors with these columns:
    • Timestamp
    • Workflow name
    • Execution URL
    • Node that failed
    • Error message
  3. Add a Slack node to send a notification with the error details

Setup required:

  • Create a Google Sheet with columns: Timestamp, Workflow, URL, Node, Error Message
  • Choose a Slack channel for error notifications

Test it: Create a simple workflow with a node that intentionally errors (like an HTTP Request to a non-existent URL), then activate both workflows and run the failing one.

Hints

  1. Add an Error Trigger node - this automatically receives error data when any workflow fails
  2. The error data is available in $json with this structure:
    • $json.workflow.name - the name of the failed workflow
    • $json.execution.url - link to the failed execution
    • $json.execution.error.node.name - the node that failed
    • $json.execution.error.message - the error message
  3. For Google Sheets, use the "Append" operation and map each field to a column
  4. For the timestamp, use the expression: {{ $now.format('yyyy-MM-dd hh:mma') }}
  5. Connect both Google Sheets and Slack to the Error Trigger in parallel (both should execute)
  6. For Slack, format a readable message with the workflow name, error, and execution URL

Explanation

The Error Trigger Pattern:

The Error Trigger is a special node that listens for failures across your entire n8n instance. When any active workflow encounters an error, n8n fires this trigger with detailed information about what went wrong.

The error payload includes:

{
  "workflow": { "name": "My Workflow" },
  "execution": {
    "url": "https://your-n8n.com/execution/123",
    "error": {
      "node": { "name": "HTTP Request" },
      "message": "Request failed with status 404"
    }
  }
}

Why This Matters:

Instead of checking each workflow individually, you have one central place that catches all failures. The Google Sheets log gives you a historical record for debugging patterns, while Slack provides immediate visibility.

Important: The Error Trigger workflow must be set as the "Error Workflow" in your n8n settings (Settings → Error Workflow) or in individual workflow settings. The Error Trigger workflow itself must also be active.

Copy the Solution

Paste into n8n with Ctrl+V to compare with your approach.

Login to see the exercise

Create an account to access challenges and track your progress.

Log in to see exercise

Related Content

Continue your learning journey with these related challenges and guides: