Centralized n8n error management system with automated email alerts via Gmail
Advanced n8n Error Handling: Automated Email Alerts & Global Error Workflow Configuration In any automated environment, n8n workflows, while powerful, can sometimes encounter unexpected issues or fail during execution. Without a dedicated error handling strategy, these failures might go unnoticed, leading to incomplete processes, data inconsistencies, or critical operational disruptions. Manually monitoring every workflow execution or sifting through logs for error details is inefficient and can significantly delay crucial fixes. This is where a centralized, automated error management system becomes essential to maintain reliability and quickly address any problems. The "Advanced n8n Error Handling: Automated Email Alerts & Global Error Workflow Configuration" template provides a robust solution to proactively manage and respond to errors within your n8n instance. For more powerful n8n templates, visit our website or contact us at AI Automation Pro. We help your business build custom AI workflow automation and apps. Highlight features Automated Email Notifications: Sends detailed HTML emails via Gmail for both execution and trigger failures, ensuring you're promptly informed. Centralized Error Management: Acts as a single, dedicated workflow to catch and process errors from multiple other n8n workflows. Proactive Global Error Handler Configuration: A scheduled task automatically scans and updates other active n8n workflows to use this workflow as their default error handler, ensuring consistent error management. Comprehensive Error Reporting: Notification emails are rich with information, including error messages, stack traces, the last executed node, direct links to failed executions, and detailed trigger failure context. Dynamic Email Content: The subject line and body of the notification email are dynamically adjusted based on whether the failure was an execution error or a trigger failure. Highly Customizable: Offers flexibility to modify email content (HTML), change the notification channel (e.g., Slack, other email providers), and adjust the logic for updating other workflows' error handlers. Scheduled Operation: The global configuration part runs on a user-definable schedule (e.g., daily, hourly) for proactive and automated error handling setup across your n8n instance. Who is this for? This workflow is designed for n8n users and administrators who want to: Establish a resilient and centralized error handling mechanism across their n8n instance. Receive immediate and detailed email notifications for any workflow failures. Automate the process of assigning a default error handling workflow to all their active n8n workflows. Save time on manually configuring error handlers for each individual workflow and ensure comprehensive error coverage. What problem is this workflow solving? / use case In an n8n environment with multiple workflows, errors can occur without immediate visibility. This can lead to: Unnoticed failures, potentially causing data loss or incomplete automated processes. Time-consuming diagnosis of issues due to a lack of readily available, detailed error information. Inefficiency and oversight from manually setting an error workflow for every new or existing workflow. This template tackles these issues by providing a proactive error management system. It not only alerts you to failures with comprehensive details but also ensures that your other workflows are automatically configured to use this centralized handler. What this workflow does This workflow operates in two distinct yet complementary parts: 1\. Scheduled Global Error Handler Configuration: Trigger: Initiates based on a configurable schedule (e.g., daily, hourly). Identify Self: Retrieves its own workflow ID to use as the designated error handler. Scan Workflows: Fetches a list of all other workflows within your n8n instance. Conditional Update Logic: For each active workflow found, it checks if: An error workflow (errorWorkflow setting) is not currently set, OR The currently set errorWorkflow is different from this central error handling workflow. The workflow is active. Apply Default Handler: If the above conditions are met, it automatically updates the target workflow's settings. This sets the current workflow as its default error handler, ensuring that any future errors in those workflows are routed here. The callerPolicy setting is also removed during this update. 2\. Error Notification via Email: Trigger: Activates whenever an error occurs in any n8n workflow that has this workflow designated as its errorWorkflow. Gather Error Context: Collects vital information about the failure, such as: The base URL of your n8n instance. Specific details of the workflow that failed (name, ID). The nature of the error: whether it's an "execution error" (occurring mid-workflow) or a "trigger failure" (occurring at the start). Format Detailed Error Message: Constructs a comprehensive HTML email tailored to the error type: For Execution Errors: The email includes a direct link to the failed execution's page, the timestamp of the error, the name of the last node that successfully executed, the error message, and the full error stack trace. For Trigger Failures: The email includes the timestamp, operational mode, error message, error name and description, relevant context data, details about the cause (message, name, code, status), and the stack trace. Send Email Notification: Dispatches the formatted HTML email using Gmail to a predefined recipient. The email subject line dynamically indicates the name of the failing workflow and the type of error, providing a quick overview. Setup Import Workflow: Import the JSON file into your n8n instance. Configure Credentials: n8n API Access: Locate the nodes: "N8n Get Error Handler", "N8n Get All Workflows", and "N8n Update Workflow". For each, select or create new n8n API credentials. These credentials must have permissions to read all workflows (workflows.read) and update workflows (workflows.update). Gmail Access: Locate the "Gmail Send Notification" node. Select or create new Gmail OAuth2 credentials to authorize n8n to send emails on your behalf. Set Email Recipient and Sender Details: Navigate to the "Settings" node, which is connected directly after the "Error Trigger" node. Modify the value for the Email Receiver variable to the email address where error notifications should be sent. Optionally, update the Email Sender Name variable. Configure Schedule (Optional): Select the "Schedule Trigger" node. Adjust the "Trigger Interval" (e.g., Every Day, Every Hour) according to how frequently you want the workflow to scan and update the error handler settings for other workflows in your n8n instance. Activate Workflow: Ensure this workflow is toggled to "Active". Once active, its scheduled component will begin operating, and it will be ready to process and notify on errors from other linked workflows. Manual Configuration (Optional): While this workflow automates the assignment, you can also manually set this workflow as the errorWorkflow in the settings of any critical existing workflows for immediate protection. How to customize this workflow to your needs Email Content & Formatting: Modify the HTML content within the "HTML For Execution Error" and "HTML For Trigger Error" nodes to alter the appearance, structure, or information included in the notification emails. Alternative Notification Channels: Replace the "Gmail Send Notification" node with a different email service node (e.g., Microsoft Outlook, SendGrid) or integrate other notification platforms like Slack, Microsoft Teams, or Discord. Remember to adjust the input data mappings for the new node. Refine Global Update Logic: Adjust the conditions within the "If No Default Error Handler Set" node if you need more granular control over which workflows are automatically updated (e.g., filter by workflow tags, names, or explicitly exclude certain workflows). Enrich Error Data: Insert additional nodes after the "Error Trigger" but before the "Settings" node if you need to fetch more context about the error or the workflow that failed (e.g., look up related information from a database or API). Advanced Notification Routing: Implement more complex logic prior to sending notifications. For example, you could use a Switch node to route error alerts to different email addresses or channels based on the name of the failing workflow or the severity of the error. Handling of callerPolicy: The "Set Data" node is configured to remove the callerPolicy setting from workflows it updates. If your workflows rely on this setting, you may need to modify or remove this part of the "Set Data" node's code. Adjust Scheduled Task: Change the frequency or timing of the "Schedule Trigger" to better suit your operational needs for the global error handler update.
Create a complete AI engineering department with OpenAI O3 and specialized agents
CTO Agent with Engineering Team Description Complete AI-powered engineering department with a Chief Technology Officer (CTO) agent orchestrating specialized engineering team members for comprehensive software development and technical operations. Overview This n8n workflow creates a comprehensive engineering department using AI agents. The CTO agent analyzes technical requests and delegates tasks to specialized agents for software architecture, DevOps, security, quality assurance, backend development, and frontend development. Features Strategic CTO agent using OpenAI O3 for complex technical decision-making Six specialized engineering agents powered by GPT-4.1-mini for efficient execution Complete software development lifecycle coverage from architecture to deployment Automated DevOps pipelines and infrastructure management Security assessments and compliance frameworks Quality assurance and test automation strategies Full-stack development capabilities Team Structure CTO Agent: Technical leadership and strategic delegation (O3 model) Software Architect Agent: System design, patterns, technology stack decisions DevOps Engineer Agent: CI/CD pipelines, infrastructure automation, containerization Security Engineer Agent: Application security, vulnerability assessments, compliance QA Test Engineer Agent: Test automation, quality strategies, performance testing Backend Developer Agent: Server-side development, APIs, database architecture Frontend Developer Agent: UI/UX development, responsive design, frontend frameworks How to Use Import the workflow into your n8n instance Configure OpenAI API credentials for all chat models Deploy the webhook for chat interactions Send technical requests via chat (e.g., "Design a scalable microservices architecture for our e-commerce platform") The CTO will analyze and delegate to appropriate specialists Receive comprehensive technical deliverables Use Cases Full Stack Development: Complete application architecture and implementation System Architecture: Scalable designs for microservices and distributed systems DevOps Automation: CI/CD pipelines, containerization, cloud deployment strategies Security Audits: Vulnerability assessments, secure coding practices, compliance Quality Assurance: Test automation frameworks, performance testing strategies Technical Documentation: API documentation, system diagrams, deployment guides Requirements n8n instance with LangChain nodes OpenAI API access (O3 for CTO, GPT-4.1-mini for specialists) Webhook capability for chat interactions Optional: Integration with development tools and platforms Cost Optimization O3 model used only for strategic CTO decisions GPT-4.1-mini provides 90% cost reduction for specialist tasks Parallel processing enables simultaneous agent execution Code template library reduces redundant development work Integration Options Connect to development platforms (GitHub, GitLab, Bitbucket) Integrate with project management tools (Jira, Trello, Asana) Link to monitoring and logging systems Export to documentation platforms Contact & Resources Website: nofluff.online YouTube: @YaronBeen LinkedIn: Yaron Been Tags SoftwareEngineering TechStack DevOps SecurityFirst QualityAssurance FullStackDevelopment Microservices CloudNative TechLeadership EngineeringAutomation n8n OpenAI MultiAgentSystem EngineeringExcellence DevAutomation TechInnovation
Automated B2B lead management and AI outreach
This workflow is a comprehensive, production-grade automation for B2B lead management and multichannel outreach, designed for Sales Development Representatives (SDRs), growth teams, and sales operations. It covers the entire SDR pipeline: from lead ingestion and validation, through enrichment, scoring, AI-powered outreach, reply handling, analytics, and reporting. Key Features: Lead validation (email, suppression, geo/GDPR) Multi-source data enrichment Lead scoring and tiering (HIGH/MEDIUM/LOW) AI-generated personalized cold emails (with A/B subject testing) Multichannel outreach (Email, LinkedIn, WhatsApp) with rate limiting and compliance AI-based reply simulation and intent classification Automated routing (qualification, follow-up, manual review) Full event logging to database Aggregated analytics and daily reporting Human-readable AI summary and Slack notifications --- What This Workflow Does Lead Ingestion & Validation Loads leads from a source (test data, CRM, webhook, etc.) Validates email format and checks against suppression lists (blocked domains/emails) Applies geo and GDPR compliance logic (blocks/flags leads from restricted countries) Data Enrichment Enriches each lead via one or more external APIs (company info, tech stack, revenue, etc.) Handles enrichment failures gracefully and logs them for analytics Lead Scoring & Segmentation Scores leads based on industry, country, company size, revenue, and pain points Segments leads into HIGH, MEDIUM, or LOW tiers for tailored outreach AI-Powered Outreach Generation Uses OpenAI (or compatible LLM) to generate personalized cold email content Creates A/B tested subject lines for each email Generates LinkedIn and WhatsApp message variants for multichannel outreach Multichannel Outreach Execution Sends emails via SMTP (with rate limiting and quiet hours) Simulates LinkedIn and WhatsApp sends (can be replaced with real integrations) Logs all outreach events to a Postgres database Reply Simulation & AI Classification Simulates a variety of lead replies (interested, not interested, follow-up, unclear) Uses AI to classify reply intent and suggest next actions Automated Routing & Follow-up Routes leads based on AI classification: Interested: Schedules meeting, logs qualification, proposes follow-up Follow-up Later: Schedules future follow-up Not Interested: Marks as closed/lost Unclear: Flags for manual review and notifies team via Slack Event Logging & Analytics Logs every significant event (enrichment, outreach, reply, status change) to a database Aggregates results by lead score, channel, and status Calculates key metrics (qualification rate, enrichment success, multichannel rate, etc.) Reporting & Team Notification Generates a daily analytics row and stores it in the database Uses AI to create a human-readable summary of the run Posts a detailed summary to a Slack channel --- Use Cases Automated SDR Workflows: Replace manual lead research, outreach, and follow-up with a fully automated, auditable process. Growth Experiments: Run A/B tests on messaging, subject lines, and channels at scale. Sales Analytics: Get transparent, granular reporting on every step of the SDR funnel. Compliance-First Outreach: Ensure all outreach respects geo, GDPR, and suppression rules. AI-Driven Personalization: Use LLMs to generate highly relevant, non-generic outreach at scale. --- Installation & Setup Import the Workflow Download or copy the workflow from the n8n Template Store. In your n8n editor, click Import and paste the workflow JSON, or use the "Use Template" button. Configure Required Credentials Postgres: Set up a Postgres credential for event and analytics logging. SMTP: Add your email provider's SMTP credentials for sending emails. OpenAI: Add your OpenAI API key for AI-powered nodes. Slack: Add your Slack API credential for notifications. Enrichment APIs: Add credentials for any external enrichment APIs you use. Customize Lead Source Replace the test data in the Load Test Leads node with your real lead source (e.g., webhook, CRM, Google Sheets, etc.). Adjust Compliance & Suppression Logic Update the suppression lists and geo/GDPR logic in the relevant nodes to match your organization's requirements. Review Multichannel Logic The workflow simulates LinkedIn and WhatsApp sends. Replace these with real integrations if needed. Database Preparation Ensure your Postgres database has the following tables (or adjust node configs): lead_events (for all event logs) analytics_daily (for daily summary rows) meetings (for scheduled meetings) execution_runs (for workflow run metadata) Test the Workflow Run the workflow manually with sample data. Check the database and Slack for logs and notifications. Review AI-generated content for tone and compliance. --- Configuration Details Rate Limiting: Email, LinkedIn, and WhatsApp sends are rate-limited and respect quiet hours. A/B Testing: Each email uses a randomly selected subject variant for ongoing optimization. AI Models: Uses OpenAI GPT-4o-mini by default; can be swapped for other models. Event Logging: Every action (enrichment, outreach, reply, status change) is logged with timestamp and payload for full traceability. Analytics: Aggregates by lead score, channel, and status; calculates rates and averages. Slack Notifications: Posts a summary of each run, including key metrics and AI-generated insights. --- Advanced Customization Add/Replace Enrichment APIs: Plug in any HTTP-based enrichment service. Custom Lead Scoring: Adjust the scoring logic in the Compute Lead Score node to fit your ICP. Custom AI Prompts: Edit the system messages in AI nodes for your brand voice. Additional Channels: Integrate SMS, phone, or other channels as needed. Webhook Triggers: Replace manual trigger with webhook for real-time automation. --- Requirements n8n version 1.123.0 or later Postgres database (or adapt for your DB) SMTP email provider OpenAI API key (or compatible LLM) Slack workspace (for notifications) (Optional) Enrichment API keys --- Template Store Submission Notes All credentials are handled via n8n's credential system (no hardcoded secrets). The workflow is modular, well-commented, and ready for production use. All event and analytics logging is auditable and GDPR-compliant. Please review and test all integrations in your environment before using in production. --- Example Analytics Output | Metric | Value | |-----------------------|---------| | Total Leads | 100 | | Qualified | 22 | | Follow-up Scheduled | 15 | | Closed Lost | 40 | | Manual Review | 3 | | Qualification Rate | 22% | | Enrichment Success | 90% | | Multichannel Rate | 60% | --- Ready to automate your SDR pipeline? Import this workflow and start scaling your B2B outreach today!
Daily meeting summaries with Google Calendar & Gemini for Slack-Discord-WhatsApp
This workflow automatically summarizes your team's daily meetings from multiple Google Calendars daily at 9AM and sends the digest to your preferred communication channels. It uses AI to identify and format meeting details, making it easy to see your schedule at a glance. --- Good to Know Multi-Calendar Support: This workflow is designed to pull events from any number of Google Calendars you've connected, providing a single, consolidated summary. AI-Powered Summaries: The AI Agent, powered by Google Gemini, is instructed to format the output with key details like title, time, duration, and a link to join the meeting. This saves you from sifting through calendar invites. How It Works A Schedule Trigger starts the workflow at a set time each day e.g at 9 AM (or any other time you choose). An AI Agent with access to the Google Calendar tool is prompted to fetch today's events from all connected calendars. The Google Calendar nodes retrieve all meetings for the current day. The AI Agent processes this information and generates a clean, structured summary. Finally, the formatted summary is sent to your team's chosen communication platforms: Slack, Discord, and WhatsApp. --- How to Use Set the Schedule: Adjust the Schedule Trigger to run at a time that works best for your team—for example, every morning before the workday begins. Connect Your Accounts: Add your Google Calendar credentials to connect all the calendars you want to monitor. Choose Your Channels: Connect the appropriate Slack, Discord, and/or WhatsApp nodes and configure them to send the message to your desired channels or groups. --- Requirements Google Gemini account: A Google Gemini account is needed for the AI Agent and Chat Model to function. Google Calendar account(s): You'll need to connect the Google Calendar accounts you wish to pull data from. Communication platform account(s): Credentials for the communication apps you want to use (Slack, Discord, WhatsApp). --- Customizing This Workflow Modify the Trigger: You can change the Schedule Trigger to a different interval or even trigger the workflow manually with a webhook. Adjust the AI Prompt: Fine-tune the AI Agent's prompt to change the summary format, include more details, or even ask it to highlight the most important meetings of the day. Add More Platforms: Easily add more communication nodes to send the daily summary to other platforms like Microsoft Teams, email, or even a custom CRM.