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


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.
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:
Open any workflow in n8n.
Click the "Executions" tab on the left sidebar.
Select any failed execution (marked in red).
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:
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:
API Rate Limiting: Hitting endpoint limits resulting in 429 errors.
Missing Credentials: 401/403 errors from expired or missing keys.
Malformed JSON: Trying to parse invalid strings or mapping objects incorrectly.
Timeouts: External services taking too long to respond.
Missing Fields: Nodes trying to access a field that doesn't exist in the input data.
Click 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
Open the node you want to retry (e.g., HTTP Request).
Click the gear icon (Settings) in the top right of the node panel.
Toggle "On Error" to "Retry Node".
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:
Try: Attempt the risky operation (like an API call).
Catch: If it fails, capture the error data instead of breaking the workflow.
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:
Go to the Settings of your risky node.
Change "On Error" to "Continue On Fail".
Add an IF node immediately after it.
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:
Webhook: Catches the lead data.
Set Node: Formats the payload.
HubSpot CRM: Attempts to create the contact (Continue On Fail enabled).
IF Node: Checks if HubSpot returned an error.
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.
Click 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:
Create a dedicated #n8n-alerts channel in Slack.
Add a Slack node to your error handling branch.
Authenticate using OAuth2.
Use Block Kit to format the error message for readability.
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:
Add a Send Email node (or equivalent) to the error branch.
Set the recipient to your ops or engineering team.
Include the workflow ID and execution ID in the subject line.
Map the full error stack trace into the email body.
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.
Click 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):
Pipedrive Trigger: "Deal Won".
Notion Node: Create Client Portal (Continue On Fail enabled).
IF Node: Checks for Notion error.
Google Sheets: Add to client tracker.
Error Handler (if Notion fails):
Set Node: Format the error details.
Slack Node: Alert the team about the failed portal creation.
Google Sheets (Error Log): Record the failure timestamp and reason.
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.
Click 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
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.
Core Deployment Stack
To build this exact architecture in production, you will need the core infrastructure. I strictly use and recommend the following enterprise-grade platforms.
n8n Cloud
The most powerful fair-code automation platform. Get 20% off your first year on any paid plan.
Vultr High-Performance VPS
Deploy self-hosted instances worldwide with enterprise NVMe storage. Get $300 in free credit.
Brevo (formerly Sendinblue)
Enterprise-grade email API and marketing automation. Excellent SMTP for n8n.
Apollo.io
The ultimate B2B database and sales engagement platform for lead generation.
Complementary RevOps Toolchain
Pinecone Vector Database
The vector database for building AI applications. Essential for RAG architectures.
Databox
Business analytics platform to build and share custom dashboards.
Monday.com
The Work OS that lets you shape workflows, your way. Perfect for team scale.
Turbotic
Enterprise automation optimization and orchestration tracking system.
CometChat
Developer-first in-app messaging and voice/video calling APIs.
AdCreative.ai
Generate conversion-focused ad creatives and social media post designs in seconds.
ElevenLabs
The most realistic text-to-speech and voice cloning software.
Emergent
AI-powered revenue operations platform for scaling B2B growth.
Tapstitch
Data integration and workflow stitching platform for modern teams.
AiSDR
AI-powered sales development representative for automated outbound.
Accelerated Growth Studio
Growth engineering and product-led acquisition acceleration platform.
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.