Back to Library
Tech Deep DiveEngineering

n8n Debugging & Error Handling Basics (Logs, Retries, Alerts to Slack & Email)-30 Days of n8n & Automation- Day 7 - AI automation for SaaS & agencies | Alfaz Mahmud Rizve

Alfaz
Alfaz Mahmud Rizve
@whoisalfaz
March 2, 2026
10 min read
n8n Debugging & Error Handling Basics (Logs, Retries, Alerts to Slack & Email)-30 Days of n8n & Automation- Day 7

This technical breakdown contains affiliate links. If you deploy this stack using my links, I earn a commission at no extra cost to you.

By Alfaz Mahmud Rizve | RevOps & Full Stack Automation Architect at whoisalfaz.me

Master n8n debugging and error handling with logs, retries, and alerts. Real examples for SaaS & agencies by Alfaz Mahmud Rizve at whoisalfaz.me.

The Reality of Production Workflows

You've built a beautiful n8n workflow. It works in tests. It works when you click "Execute." But at 2 AM, your client's data sync fails silently, and you don't know until they complain three days later.

This is where n8n debugging and error handling separates hobbyists from professionals. **Alfaz Mahmud Rizve** has seen workflows that looked perfect fail in production because no one set up proper error handling. This post teaches you how to catch, log, and fix those issues before they become disasters.

By the end of Day 7 of the 30 Days of n8n & Automation series, you'll know:

  • How to read┬án8n debugging logs┬álike a pro

  • Why┬áretries matter┬áand how to set them up

  • How to send┬áreal-time alerts┬áto Slack and email when things break

This isn't theory. These are patterns Alfaz Mahmud Rizve uses for every production automation at whoisalfaz.me.

n8n debugging workflow catching error and sending Slack alert by Alfaz Mahmud Rizve automation for SaaS and agencies.Click to expand

Part 1: Understanding n8n Debugging Logs

Every workflow run creates logs. Most people never look at them. That's a mistake.

Where to find your logs

In n8n:

1

Open any workflow in n8n.

2

Click the "Executions" tab on the left sidebar.

3

Select any failed execution (marked in red).

4

Click on the node that failed to see the detailed JSON error output.

That error message is your n8n debugging clue. It tells you:

  • Which node failed

  • What input it received

  • Why it failed (missing field, API error, timeout, etc.)

Real example: API call failure

Let's say your HTTP Request node fails with:

JSON Payload
Error: 401 Unauthorized

This means your API credentials are wrong or expired. Without n8n debugging, you'd spend hours guessing. With it, you know in seconds: re-check your API key.

Pro tip from Alfaz Mahmud Rizve: Always check node output before moving to retries or alerts. 80% of issues are caught here.

The 5 Most Common n8n Debugging Scenarios

When building n8n debugging workflows, expect these errors:

1

API Rate Limiting: Hitting endpoint limits resulting in 429 errors.

2

Missing Credentials: 401/403 errors from expired or missing keys.

3

Malformed JSON: Trying to parse invalid strings or mapping objects incorrectly.

4

Timeouts: External services taking too long to respond.

5

Missing Fields: Nodes trying to access a field that doesn't exist in the input data.

n8n debugging panel displaying error message and stack trace by Alfaz Mahmud Rizve for workflow troubleshootingClick to expand

Part 2: Retries ΓÇô Your First Line of Defense

A retry automatically runs a failed node again, usually after a short delay. This catches temporary failures (API hiccup, network blip, temporary overload).

How to set up retries in n8n

1

Open the node you want to retry (e.g., HTTP Request).

2

Click the gear icon (Settings) in the top right of the node panel.

3

Toggle "On Error" to "Retry Node".

4

Set the max retries (e.g., 3) and wait time between retries (e.g., 5000ms).

When retries work

Retries are gold for:

  • Rate-limited APIs (they recover after a few seconds)

  • Flaky network calls

  • Temporary timeouts

When retries DON'T work

Don't waste retries on:

  • Auth failures (wrong API key won't magically fix itself)

  • Data validation errors (malformed email won't become valid on retry)

  • Missing required fields

Alfaz Mahmud Rizve's rule: If a human would get the same error on retry, retries won't help. You need error handling instead.

Part 3: Error Handling ΓÇô Catching and Routing Failures

Retries are good, but they fail eventually. When they do, you need error handling to decide what happens next: log it, notify, or retry a different way.

The Try-Catch pattern

This is the most powerful n8n debugging pattern. Here's how:

1

Try: Attempt the risky operation (like an API call).

2

Catch: If it fails, capture the error data instead of breaking the workflow.

3

Handle: Route the error data to an alert node or fallback process.

How to build Try-Catch in n8n

n8n doesn't have a visual "Try-Catch" node, but you can simulate it:

1

Go to the Settings of your risky node.

2

Change "On Error" to "Continue On Fail".

3

Add an IF node immediately after it.

4

Set the IF condition to check if {{$json.error}} exists to route successes and failures differently.

Real workflow example

Let's build a simple but powerful n8n debugging workflow:

Scenario: Sync leads from a form to your CRM. If the sync fails, log it and alert the team.

Nodes:

1

Webhook: Catches the lead data.

2

Set Node: Formats the payload.

3

HubSpot CRM: Attempts to create the contact (Continue On Fail enabled).

4

IF Node: Checks if HubSpot returned an error.

5

Slack Node: Sends the error alert if the IF node evaluates to true.

This workflow ensures no lead is lost ΓÇô even if the CRM fails, you have a log and know about it.

Screenshot-style illustration of a Slack notification alert showing workflow error message: 'Lead Sync Failed', error details, timestamp, and action buttons, modern Slack UI with blue and white colors, clean typography, showing professionalism and clarity for team alertsClick to expand

Part 4: Real-Time Alerts ΓÇô Slack & Email

When an error happens, silence is your enemy. Real-time alerts keep you in the loop.

Option 1: Slack Alerts (fastest)

Slack is usually the best choice because:

  • Instant notification to your phone

  • Team can see it immediately

  • Easy to thread and discuss

Setup:

1

Create a dedicated #n8n-alerts channel in Slack.

2

Add a Slack node to your error handling branch.

3

Authenticate using OAuth2.

4

Use Block Kit to format the error message for readability.

JSON Payload
Workflow: Lead Sync Failed
Error: API returned 500
Lead Email: {{$json["email"]}}
Time: {{$now.toISO()}}
Action: Check CRM status, retry manually if needed

Pro tip from Alfaz Mahmud Rizve: Use message formatting with bullet points so your team can scan it quickly.

Option 2: Email Alerts (persistent record)

Slack is great, but emails create a record and work even if Slack is down.

Setup:

1

Add a Send Email node (or equivalent) to the error branch.

2

Set the recipient to your ops or engineering team.

3

Include the workflow ID and execution ID in the subject line.

4

Map the full error stack trace into the email body.

JSON Payload
Workflow: {{workflow_name}}
Error: {{error_message}}
Node: {{failed_node_name}}
Time: {{execution_time}}
Details: {{full_error_stack}}

Next steps:
1. Check logs in n8n dashboard
2. Verify API credentials
3. Retry manually if it's a temporary issue

Option 3: Combined Alerts (best)

For critical workflows (lead sync, billing, client data), send BOTH Slack + Email:

  • Slack for immediate awareness

  • Email for persistent record

This ensures Alfaz Mahmud Rizve's principle: visible failures are fixed; hidden failures are disasters.

Try-Catch error handling pattern in n8n workflow splitting success and error paths by Alfaz Mahmud Rizve for production automationClick to expand

Part 5: Building Your First Production-Ready Workflow

Let's bring it all together. Here's a real n8n debugging workflow you can copy for your SaaS or agency:

The workflow: "Client Onboarding with Error Handling"

Goal: When a deal is won in your CRM, automatically create a Notion page, send an email, and add to a Google Sheet. If anything fails, alert Slack and log it.

Nodes (in order):

1

Pipedrive Trigger: "Deal Won".

2

Notion Node: Create Client Portal (Continue On Fail enabled).

3

IF Node: Checks for Notion error.

4

Google Sheets: Add to client tracker.

Error Handler (if Notion fails):

1

Set Node: Format the error details.

2

Slack Node: Alert the team about the failed portal creation.

3

Google Sheets (Error Log): Record the failure timestamp and reason.

4

Stop Node: Gracefully end execution for this branch.

This workflow ensures:

  • Γ£à┬áVisibility:┬áTeam knows immediately if onboarding fails

  • Γ£à┬áRecoverability:┬áNothing is silently lost; all failures are logged

  • Γ£à┬áAudit trail:┬áGoogle Sheets has a record of every attempt and error

Alfaz Mahmud Rizve uses this pattern for every client-facing workflow at whoisalfaz.me.

Complete n8n client onboarding workflow with error handling and alert system by Alfaz Mahmud Rizve for production-ready automationClick to expand

Checklist: Is Your Workflow Production-Ready?

Before you deploy any n8n debugging workflow, check:

  • Retries enabled on all API calls (3 retries with exponential backoff)

  • Error handling for every risky node (HTTP Request, database writes, API calls)

  • Slack alert for critical failures (lead loss, payment failure, data sync broken)

  • Email alert sent to admin with full error context

  • Logging to Google Sheets or database of all failures

  • Manual retry option (a button or workflow to re-run failed records)

  • Tested with bad data (test how it handles null fields, API errors, timeouts)

If you can check all of these, your workflow is production-ready.

Common Mistakes (and How to Avoid Them)

Mistake 1: Retrying forever

Don't set max retries to 100. You'll waste API quota and look like a bot. 3ΓÇô5 retries is standard.

Mistake 2: Silent failures

A workflow that fails silently is worse than no workflow. Always add alerts.

Mistake 3: Not logging errors

You forgot what went wrong last week? Always log to Google Sheets or a database.

Mistake 4: Catching errors but doing nothing

If you catch an error, handle it. Slack the team, email admin, or retry differently. Silent catches = hidden disasters.

How This Fits Into 30 Days of n8n & Automation

By Day 7, you now understand:

  • How to read┬án8n debugging logs┬áto find problems fast

  • How to use┬áretries┬áfor temporary failures

  • How to build┬áerror handling┬áworkflows that catch and notify

  • How to send┬áreal-time alerts┬áto Slack and email

The next posts in this series will show you how to apply these patterns to real-world automations: lead handling, client onboarding, reporting, and more.

Every workflow you build from here on should follow the patterns you learned in n8n debugging and error handling. This isn't extra workΓÇöit's the difference between automation that works and automation that creates silent disasters.

Your Next Step

1
Open your most critical workflow.
2
Select the node most likely to break (usually an external API call).
3
Toggle "Continue On Fail" and build an IF node branch.
4
Connect it to a Slack notification.

Once you see that Slack notification, you'll understand why Alfaz Mahmud Rizve says debugging and error handling is the most important part of production automation.

Subscribe to the newsletter to get Day 8 tomorrow, where we'll build your first real-world workflow with everything you've learned so far.


Complementary RevOps Toolchain

Vector DB

Pinecone Vector Database

The vector database for building AI applications. Essential for RAG architectures.

Start Building with Pinecone
Secure Link
Verified Partner
Analytics

Databox

Business analytics platform to build and share custom dashboards.

Start Visualizing Data
Secure Link
Verified Partner
Work OS

Monday.com

The Work OS that lets you shape workflows, your way. Perfect for team scale.

Try Monday.com
Secure Link
Verified Partner
Orchestration

Turbotic

Enterprise automation optimization and orchestration tracking system.

Explore Turbotic
Secure Link
Verified Partner
Comms API

CometChat

Developer-first in-app messaging and voice/video calling APIs.

Integrate CometChat
Secure Link
Verified Partner
AI Design

AdCreative.ai

Generate conversion-focused ad creatives and social media post designs in seconds.

Try AdCreative Free
Secure Link
Verified Partner
Voice AI

ElevenLabs

The most realistic text-to-speech and voice cloning software.

Try ElevenLabs
Secure Link
Verified Partner
RevOps AI

Emergent

AI-powered revenue operations platform for scaling B2B growth.

Try Emergent
Secure Link
Verified Partner
Integration

Tapstitch

Data integration and workflow stitching platform for modern teams.

Explore Tapstitch
Secure Link
Verified Partner
AI Sales

AiSDR

AI-powered sales development representative for automated outbound.

Try AiSDR
Secure Link
Verified Partner
Growth

Accelerated Growth Studio

Growth engineering and product-led acquisition acceleration platform.

Explore AGS
Secure Link
Verified Partner

In this Article

Ready to automate your agency?

Skip the manual grunt work. Let's build a custom system that runs your business on autopilot 24/7.