Daniel Ng
A Growth Hacker, Digital Marketer & AI Automation Builder with 10+ years of experience in Growth Marketing & Workflow Automation. Based in Helsinki, Finland. For questions about my templates and customization, contact me at: daniel@aiautomationpro.org
Templates by Daniel Ng
WordPress auto-blogging pro - content automation machine for SEO topics
The best content automation in the market! This advanced workflow not only creates and publishes SEO-optimized blog posts to your WordPress website but also backs up all content and images to a designated folder in your Google Drive. In addition, It generates a unique image for each chapter and a featured image for the overall article, and it automatically collects internal website links—seamlessly inserting them throughout each chapter and the entire article. This integrated approach enhances on-page SEO, improves navigation, and streamlines your content creation process, saving you time while ensuring your work is securely stored. How it works Triggers upon adding a new row to a Google Sheets. Generates a full blog post by writing content based on customizable parameters such as topic, target audience, length, style, and seed keyword. Generates and adds images for each chapter as well as a featured image for the article. Gathers internal website links and strategically embeds them within each chapter and throughout the article, boosting SEO and enhancing user navigation. Publishes the blog post directly to your WordPress website. Saves all content (blog post and images) to Google Drive, organizing them in a folder named after the blog post title. Unique features Full Automation: The workflow is designed to be 100% automated. Once imported and configured, it can run without manual intervention. Simple Activation: It can be easily triggered through the Google Spreadsheets interface. You simply add a new row to a Google Sheet. Customization Options: Offers a wide array of customization options, including topic, category, target audience, word count, number of chapters, length of introduction and conclusion, and writing style. It also allows for the inclusion of calls-to-action (CTAs) and company/product introductions. Automatic Content Saving: After writing a blog post, all content and images are automatically saved to Google Drive, preventing data loss. The folder is even named after the title of the blog post. SEO-Optimized Content: It's designed to create content optimized for SEO using seed keywords. AI Model Flexibility: It’s super easy to switch between different AI models through the Open Router node. Rate Limit Handling: Includes "Wait" nodes to avoid rate limits. Internal Link Limit: Limits the number of internal links to 20 by default. Set up steps Install the workflow template: Import the JSON file into your n8n instance. Connect the workflow to your accounts: This includes linking your WordPress website, Google Drive, and AI models (such as OpenAI GPT-4o). Configure the Google Sheet: Ensure your Google Sheet is set up to trigger the workflow upon adding a new row and that the input data is correctly formatted. Customize the workflow: Adjust parameters like topic, target audience, and writing style to match your specific content needs. Optimize prompts for best results. Test the workflow: Use low-cost AI models and image settings initially to ensure everything runs smoothly. Tailor Further as Needed: Modify workflow elements to align perfectly with your needs and content strategy.
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.
WordPress content automation machine with HUMAN-IN-THE-LOOP & DEEP RESEARCH
HUMAN-IN-THE-LOOP Content Automation Pro with Deep Research & Airtable for Power Users \- Collaborative AI for WordPress Blog Automation The BEST n8n Content Automation workflow in the market is getting even better, now enabling you to have full control over the entire process. It’s time to unlock the power of true collaborative creation with GenAI\! Want to leverage AI automation but don't want to give up full control over the whole content creation process? Get the best of both worlds \- get “Human-in-the-Loop” with this supreme n8n workflow template\! This template blends the power of AI with the crucial oversight of human expertise and intervention, all managed through a central, streamlined Airtable interface. Say goodbye to generic content and hello to high-quality, deeply researched articles published directly to your WordPress site with full control. Check out my Youtube channel for a full walkthrough. What problem is this workflow solving? / Use cases Fully automated content generation tools often lack the nuance, accuracy, and strategic control necessary for truly impactful content. This workflow solves that critical gap by integrating powerful AI capabilities into a structured, human-supervised content creation process managed via a simple interface. It automates the most repetitive and time-consuming tasks – like research gathering, chapter ideations, domain copywriting – while strategically embedding essential human review points at critical junctures. Instead of simply providing a topic and receiving a finished article of uncertain quality, you actively guide the process step-by-step within an interface. You review, refine, and approve AI suggestions for chapters and content before finalizing and publishing. This approach makes it perfect for creating high-quality, deeply researched, and brand-aligned blog posts for WordPress more efficiently, without ever sacrificing essential editorial control. Who is this for? This workflow template is meticulously designed for individuals and teams deeply involved in content creation who seek a powerful blend of AI-driven efficiency and essential human-controlled quality assurance: Content Creators & Bloggers: Who want to leverage AI for drafting and research but maintain full editorial control. Marketing Teams: Looking to scale content production efficiently while ensuring brand voice and quality consistency. SEO Specialists: Needing to produce well-researched, structured, and SEO-optimized content regularly. Agencies: Managing content creation for multiple clients with a structured, repeatable process. Anyone who prefers a "human-in-the-loop" approach over fully automated "black box" content generators. How this workflow works This template automates significant portions of the WordPress content creation process, utilizing Airtable as the central hub for management and user interaction, while leveraging AI for research and copywriting. The system is composed of four interconnected n8n flows, each handling a distinct stage of the content lifecycle. In addition, there is a sub-workflow dedicated to the research tool (Perplexity). Content Creation Process in Airtable The entire journey from idea to published post is managed within your Airtable base, offering transparency and control. Progress through each tab sequentially to complete the content creation process and produce a high-quality article that fulfills your requirements. Configure Settings (“Settings” Table): Define global parameters (website details, target audience, writing style, category IDs, about us, CTA etc.) in the “Settings” table. These serve as default inputs for the AI. Create Topics (“Create Topics“ Table): Add a record to the “Create Topics” table for each new blog post idea. Mark the topic as ready by setting its 'Status' field to “To Do” and ticking the 'Execute Flow' checkbox to initiate the first flow. Generate Chapters (“Generate Chapters“ Table): The first flow calls to the sub-workflow to do online research and generates potential chapter outlines based on your topic and settings, saving them to the “Generate Chapters” table. Select Chapters to Write (“Select Chapters“ Table): Review the suggested chapters in the “Select Chapters“ Table. Select the chapters you want to proceed with by setting their 'Status' to “To Do” and ticking the 'Execute Flow' checkbox. Generate Content for selected Chapters (“Generate Content“ Table): The second flow calls to the sub-workflow to research each selected chapter and generates draft content, saving it to the “Generate Content” table, where you have the opportunity to review and modify if necessary. Select Chapter Content (“Select Content“ Table): Review and edit the AI-generated text directly in Airtable. Approve the content for each chapter. Once all necessary content is approved, trigger the third flow for the final assembly by setting the status to “To Do” and ticking the 'Execute Flow' checkbox. Finalize Post (“Finalize Post“ Table): The third flow aggregates the approved content, generates the title, SEO metadata, tags, chapter images and featured image, placing all compiled information in the “Finalize Post” table for your final review. When the final article is ready to be published on your website, mark the status as "To Do" and check the "Ready to Publish" box to activate the fourth and final flow. Publish & Backup Post (“Backup Post“ Table): the fourth flow publishes the post to the website and creates a backup record in the “Backup Post” table, archiving key details including the live URL of the published article. n8n Workflow Functions (JSON Files) The automation is handled by four separate n8n flows, each triggered by specific changes in Airtable: Flow 1 (Topic Initiation & Chapter Generation): Trigger: Monitors the “Create Topics” table; activates when a record's 'Status' is "To Do" AND 'Execute Flow' checkbox is ticked. Action: Fetches settings from Settings. Performs initial research (e.g., via Perplexity). Uses AI to generate chapter outlines. Saves suggestions as new records in the “Generate Chapters” table. Flow 2 (Content Generation & Internal Linking): Trigger: Monitors the “Select Chapters” table; activates when a record's 'Status' is "To Do" AND 'Execute Flow' checkbox is ticked. Action: Fetches chapter details and settings. Gathers internal links (e.g., by parsing sitemap). Performs online/ deep research per chapter. Uses AI to write draft content, incorporating research and links. Saves drafts into corresponding records in the “Generate Content” table. Flow 3 (Post Assembly & Image Generation): Trigger: Monitors the “Select Content” table; activates when all content for a topic is approved and final assembly is triggered when a record's 'Status' is "To Do" AND 'Execute Flow' checkbox is ticked. Action: Fetches all content from the “Generate Content” table. Aggregates text. Uses AI for title, SEO metadata, tags, and image prompts. Generates chapter images and a featured cover image (e.g., via AI image model DALL-E). Converts content to HTML. Saves compiled data and image info into the “Finalize Post” table. Flow 4 (WordPress Publishing & Backup): Trigger: Monitors the “Finalize Post” table; activates when a record is marked Status' is "To Do" AND ‘Post to Website’ checkbox is ticked. Action: Fetches finalized data. Uploads images to WordPress. Creates WordPress post (status set to “published” by default) with content, metadata, tags, and image. Creates a record in the “Backup Post” table, with a link to the post on the website. This modular approach ensures each stage is handled distinctly, orchestrated via updates on Airtable interface. Unique Features Human-in-the-Loop Design: Guarantees quality and relevance through mandatory user review and approval stages within Airtable for chapters, content, and the final post. Collaborative AI Partnership: Leverages AI as a powerful assistant for research, structuring, and drafting, significantly boosting productivity while relying on human expertise for refinement and final judgment. Airtable as Interface & Control Center: Utilizes Airtable as an intuitive interface and central database to manage the entire content lifecycle, offering clear progress tracking and facilitating team collaboration. Deep Research Integration: Incorporates external research tools (like Perplexity) to ensure content is based on fresh, up-to-date information, crucial for accuracy and authority. Modular n8n Structure: Simplifies complexity by dividing the process into four manageable, interconnected flows plus one sub-flows, making the system easier to understand, troubleshoot, and customize. Rate-limit Aware: Includes built-in Wait nodes and logic designed to mitigate API rate limit issues from AI and research tools, enhancing workflow reliability during intensive use. Multiple-Image Generation: Generates and adds images for each chapter, as well as a featured image for the article. Direct WordPress Integration: Streamlines publication by automatically sending finalized, formatted content, metadata, tags, and the featured image directly to your WordPress site. Internal Linking: Embeds internal website links strategically within each chapter and throughout the article, boosting SEO and enhancing user navigation. Integrated Backup: Provides data security by automatically archiving key post details in Airtable and optionally saving text and image files to Google Drive. Future Features “Deeper Research”: Plans for multi-level research capabilities to enable the creation of even more comprehensive reports or e-book length content. Content Sample: Provide content samples for the AI to learn from and mimic in terms of writing style and guidelines. Category-Specific Styling: Aiming to allow users to define styles per category for the AI to learn and imitate, ensuring greater brand consistency. Advanced Link Insertion: Developing more sophisticated strategies for inserting relevant internal and external links, including automatic source citation and dynamic internal link density adjustments. Requirements Airtable Account: create a Airtable account for free. WordPress Website: Requires an Application Password with permissions to create posts and upload media. Must have the REST API enabled. OpenAI API Key: Or a key from another compatible AI provider for text and image generation (DALL-E is the default for images). Perplexity API Key: Or an API key for your chosen online research tool. Google Drive: for the optional backup feature to Google Drive. Setup Step-by-Step Import n8n Workflows: Download the .json workflow files and import them into your n8n instance. There is one main/ “month” workflow and one sub/ “child” workflow. Name the workflows to your needs. Get Airtable Base: Duplicate the companion Airtable Base template. Configure Credentials: Add new credentials in n8n for Airtable, WordPress (use Application Password), OpenAI API, PerplexityAI API, and Google (for Drive backup). Connect Workflow Nodes: Open each workflow in n8n and assign the correct credential to every node that requires authentication (Airtable, WordPress, AI, HTTP Request, Google nodes). Link the main workflow to the sub-workflow: Access the Research Tool nodes and establish a connection between the main workflow to sub-workflow. Configure Airtable Nodes: Update all Airtable nodes across all workflows. Verify that all 'Table' and 'Field' names in the nodes exactly match your duplicated base. Populate Airtable Settings: Fill in your specific details in the Settings table of your Airtable base (Website URL, Audience, Style, Category IDs, CTA, etc.). Test Connections: Run manual executions on key nodes within each flow to ensure connections and basic configurations are correct before activating. Activate Workflow: Toggle the "Active" switch ON for the main/ “mother” workflow in your n8n list. No need to activate the sub/ “child” workflow. Start Creating: Go to the Create Topics table in Airtable, add a new topic, go through the process and get amazed by AI magic\! Airtable Database Explanation Airtable is the central hub, acting as the database, user interface, and trigger mechanism for this workflow. Structure: The base uses linked tables to manage the process: Settings: Global configurations. Create Topics: Initiates new content pieces. Generate Chapters: Stores AI-generated chapter outlines for review. Select Chapters: Facilitates user selection of chapters to write. Generate Content: Stores AI-generated draft content for selected chapters. Select Content: Manages user approval of drafted content before final assembly. Finalize Post: Holds the compiled post (text, metadata, image info) for final review and publish trigger. Backup Post: Archives data (including live URL) of successfully published posts. Workflow Interaction: User updates trigger fields in Airtable (e.g., sets Status='To Do' & Execute Flow=true). n8n Airtable Trigger nodes detect these specific changes. The corresponding n8n flow runs, fetching data from Airtable. AI and other tools process data and generate outputs. Results are written back to the appropriate Airtable tables/fields. User reviews results in Airtable and triggers the next stage via status AND checkbox updates. Setup: Using the exact duplicated Airtable base template is mandatory, as n8n workflows expect specific table and field names. Tips for Pros AI Prompts: Modify prompts in the AI nodes to refine tone, style, format, or incorporate specific instructions. AI Models: the workflow is optimized for OpenAI's GPT-4o model due to its consistent performance. While you can replace the AI models in the nodes with alternatives (if you have the credentials for them), keep in mind that the workflow may not function. AI Research Model: PerplexityAI is the tool of choice for research. The "sonar" model is the default for research in this workflow due to its speed and cost-effectiveness. However, you are welcome to explore Perplexity's other models, such as the "sonar-deep-research" model, which is specifically designed for in-depth research. AI Image Model: The default AI model for image generation is OpenAI’s Dall-E. However, the outputs of this model are not impressive. While OpenAI's 4o multimodal is expected to be available via API soon, better/ superior image quality can be achieved in the meantime by using alternative AI image models (such as FLUX.1). Airtable Base: Add or modify fields/tables to match your specific tracking needs, but remember to update corresponding n8n nodes accordingly. 3rd-party Integrations: Replace research tools, image generators, or modify the final step to publish to a different CMS or add post-publication steps like social sharing. Error Handling: For production reliability, incorporate an “Error Handling” workflow in n8n for this automation to catch failures and send notifications Important Considerations API Rate Limits: AI and research tools have usage limits. High volume processing might cause errors. The included Wait nodes help, but may need adjustment based on your API plans. Testing Costs: API calls to AI models aren't free. To ensure the workflow runs correctly, start testing with OpenAI's GPT-4o. Once you've confirmed functionality, explore using other AI models which may be cheaper to keep costs down. Be aware that the workflow may not be as reliable with models other than GPT-4o. Keep an eye on your API provider's billing dashboard to monitor usage and costs. Sequential Processing: The workflow processes one topic fully at a time to ensure stability and manage API limits. For fully automated, parallel processing from a list, consider the alternative template: [“\[n8n\] Content Automation Pro – with DEEP RESEARCH – WordPress Blog Automation”](https://n8n.io/workflows/3041-wordpress-auto-blogging-pro-with-deep-research-content-automation-machine/).
Scheduled workflow backups from n8n to Google Drive with auto cleanup
Auto Backup n8n Workflows to Google Drive Imagine the sinking feeling: hours, weeks, or even months of meticulous work building your n8n workflows, suddenly gone. A server crash, an accidental deletion, data corruption, or an unexpected platform issue – and all your automated processes vanish. Without a reliable backup system, you're facing a complete rebuild from scratch, a scenario that's not just frustrating but can be catastrophic for business operations. Furthermore, consider the daunting task of migrating your n8n instance to a new host or server. Manually exporting each workflow, one by one, then painstakingly importing them into the new environment is not only incredibly time-consuming, especially if you have tens or hundreds of workflows, but also highly prone to errors and omissions. You need a systematic, automated solution. This workflow provides a robust solution for automatically backing up all your n8n workflows to Google Drive on schedule (default to every hour). It creates a uniquely named folder for each backup instance, incorporating the date and hour, and then systematically uploads each workflow as an individual JSON file. To manage storage space, the workflow also includes a cleanup mechanism that deletes backup folders older than a user-defined retention period (defaulting to 7 days). Ideally, this backup workflow should be used in conjunction with a restore solution like our "Restore Workflows from Google Drive Backups" template. 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. Feature highlights Triggers on schedule (default to hourly). Creates a \n8n\backup\YYYY-MM-DD\_HH\ folder in Google Drive. Fetches all n8n workflows. Saves each workflow as a JSON file to the new folder. Deletes backup folders older than the 'Coverage Period' (default to 7 days). Who is this for? This template is designed for: n8n Administrators and Developers: Who need a reliable, automated system to safeguard their workflows against accidental loss, corruption, or system issues. Proactive n8n Users: Who want to maintain a version history of their workflows, enabling easy rollback to previous configurations if necessary. Organizations: Seeking to implement disaster recovery and data integrity practices for their n8n automation infrastructure. What problem is this workflow solving? / use case This workflow directly addresses these critical risks and challenges by: Automating Backups: Eliminates the manual effort and inconsistency of ad-hoc backups, ensuring your workflows are regularly and reliably saved. Preventing Data Loss: Safeguards your valuable automation assets against unforeseen disasters by creating secure, versioned copies in Google Drive. Facilitating Migration & Recovery: Provides the foundational backups needed for a smoother, more systematic migration or a full disaster recovery, allowing you to restore your operations efficiently. Version Control: By storing scheduled backups (defaulting to hourly), it allows you to access and restore previous versions of your workflows, offering an undo capability for significant changes or corruptions. Storage Management: Automatically removes old backups based on a configurable retention period, preventing excessive use of Google Drive storage while keeping a relevant history. What this workflow does Scheduled Trigger: Runs automatically every hour. Timestamping: Fetches the current date and hour to create a unique name for the backup folder. Folder Creation: Creates a new folder in a specified Google Drive location. The folder is named in the format: n8nbackupYYYY-MM-DD_HH. Workflow Retrieval: Connects to your n8n instance via its API and fetches a list of all existing workflows. Individual Backup: Processes each workflow one by one: Converts the workflow data to a binary JSON file. Uploads the JSON file (named after the workflow) to the hourly backup folder in Google Drive. Includes a short wait step between uploads to respect potential API rate limits. Old Backup Deletion: Calculates a cut-off date based on the "Coverage Period" set in the "Settings" node (e.g., 7 days prior to the current date). Searches Google Drive for backup folders (matching the naming convention) that are older than this cut-off date. Deletes these identified old backup folders to free up storage space. Step-by-step setup Import Template: Upload the provided JSON file into your n8n instance. Configure Credentials: Google Drive Nodes: You will need to create or select existing Google Drive OAuth2 API credentials for these nodes. n8n Node: n8n (node that fetches workflows) Configure n8n API credentials to allow the workflow to access your instance's workflow data. Specify Google Drive Backup Location: Open the "Google Drive Backup Folder Every Hour" node. Under the "Drive ID" parameter: select it from the list or provide its ID. Under the "Folder ID" parameter: select or input the ID of the parent folder in Google Drive where you want the n8nbackupYYYY-MM-DDHH folders to be created (e.g., a general "n8n\Backups" folder). Set Backup Retention Period: Open the "Settings" node. Modify the value for "Coverage Period" (default is 7). This number represents the number of days backups should be kept before being deleted. Activate Workflow: Toggle the "Active" switch for the workflow in your n8n dashboard. How to customize this workflow to your needs Backup Frequency: Adjust the "Rule" in the "Schedule Trigger" node to change the backup interval (e.g., daily, specific times). Folder/File Naming: Modify the expressions in the "Parameters" tab of the "Google Drive Backup Folder Every Hour" node (for folder name) or the "Google Drive Upload Workflows" node (for file name) if you require a different naming convention. Targeted Backups: To back up only specific workflows, insert a "Filter" node after the "n8n" node to filter workflows based on criteria like name, tags, or ID before they reach the "Move Binary Data" node. Wait Time: The "Wait" node is set to 3 seconds between uploads. If you have a very large number of workflows or encounter rate limiting, you might adjust this duration. Error Workflow: The workflow is pre-configured with an "Error Workflow" setting. Ensure this error workflow exists in your n8n instance, or update the setting to point to your preferred error handling workflow. This can be used to send notifications on failure. Important Considerations Resource Usage: While the workflow includes a wait step between individual workflow uploads to minimize load, backing up an extremely large number of workflows could still consume resources on your n8n instance and make many API calls to Google Drive. Monitor performance if you have thousands of workflows. Testing Restore Process: Regularly test restoring a few workflows from your Google Drive backups using the companion "Restore All n8n Workflows from Google Drive" template or a manual import. This verifies the integrity of your backups and ensures you can recover when needed. Workflow Modifications: If you modify this backup workflow (e.g., change the folder naming convention), ensure your restore process or workflow is also updated to match these changes.
Multi-language Telegram RAG chatbot with supervisor AI & automated Google Drive pipeline
N8N Hybrid RAG Chatbot with Multiple AI Agents One of the most powerful system in the market, this template creates a sophisticated, multi-agent hybrid RAG (Retrieval-Augmented Generation) chatbot that can handle diverse user queries by routing them to a “Supervisor AI agent”. The Supervisor agent will then send the request to “Expert AI agents”, agents specializing in specific domains. In addition, this system automates data ingestion from various sources (including websites and Google Drive), processes and stores the information in a vector database, and interacts with users through Telegram in multiple languages. For more powerful n8n templates, visit our website at aiautomationpro.org. Who’s it for? This template is ideal for: Developers and Businesses looking to build a powerful, knowledge-based chatbot for customer support, internal knowledge management, or lead generation. AI Enthusiasts who want to explore advanced concepts like multi-agent systems, RAG, and automated data pipelines. n8n Users who want to build a scalable and customizable AI solution that integrates multiple services. Key Features Multi-Agent Architecture: Utilizes a supervisor agent to route queries to specialized agents for different domains (e.g., Products, News, Academy). Automated Data Ingestion: Automatically scrapes data from websites and syncs new or updated files from Google Drive. Retrieval-Augmented Generation (RAG): Enriches the chatbot's knowledge by retrieving relevant information from a Supabase vector store and a Postgres database. Telegram Integration: Provides a seamless, multi-language chat interface for users to interact with the bot. Dynamic Data Handling: Automatically processes and embeds data from various sources like Google Docs, PDFs, and Word documents. Data Management: Keeps the knowledge base up-to-date by automatically handling document creation, updates, and deletions. How it works The workflow is divided into three main parts: data ingestion, data management, and the chat interface. Data Ingestion & Processing: Web Scraping: The workflow fetches URLs from a Google Sheet, scrapes the content using Crawl4ai, cleans it with an AI agent, and saves it to a Google Doc. Google Drive Sync: It monitors specific Google Drive folders for new or updated files (Google Docs, PDFs, Word documents). Embedding & Storage: The content from these sources is then chunked, converted into vector embeddings using OpenAI, and stored in a Supabase vector database for efficient retrieval. Data Deletion: A scheduled trigger periodically checks a Google Sheet for records marked as "deleted." It then removes the corresponding data from the Supabase vector store and deletes the file from Google Drive to ensure the chatbot's knowledge remains current. Chat Interface & Logic (Telegram): User Input: The chatbot receives user messages via a Telegram trigger. Language Detection: It first detects the language of the query and translates it to English if necessary. Supervisor Agent: A central "Supervisor" AI agent analyzes the user's query. Agent Routing: Based on the query, the Supervisor delegates the task to the most appropriate specialized agent: News AI Agent: Handles questions about current events. Product AI Agent: Answers queries about product details from a Postgres database. Academy AI Agent: Responds to questions about courses and educational content. Response Generation: The selected agent processes the query, retrieves the necessary information using RAG, generates a response, and translates it back to the user's original language before sending it via Telegram. Requirements To use this template, you will need accounts and credentials for the following services: n8n OpenAI Supabase (for vector storage) Google Workspace (Google Drive, Google Sheets, Google Docs) Telegram Bot Postgres Database Crawl4AI Step-by-step Setup Configure Credentials: Add your API keys and credentials for all the required services (OpenAI, Supabase, Google, Telegram, Postgres) in the n8n Credentials section. Set up Google Drive: Create two folders in your Google Drive: one for documents scraped from websites and another for manual document uploads. Note the folder IDs. Set up Google Sheets: Clone the Google Sheet template, or create a Google Sheet with two tabs: Website Links and Manual Documents. In the Website Links tab, add columns for Link, Category Code, Is Scraped, and Is Deleted. In the Manual Documents tab, add columns for Document ID, Title, Category Code, and Is Deleted. Set up Supabase: Create a new project in Supabase. Run the provided SQL script to create the documents table for vector storage. Set up Postgres: Set up a Postgres database (in Supabase). Run the provided SQL script to create the products table to store product details. Configure the Main Workflow: Open the AIAutomationPro Ultimate RAG Chatbot main workflow. Update the Google Drive, Google Sheets, Supabase, and Postgres nodes with your specific Folder IDs, Sheet Names, and table names. Link the three sub-workflows (News AI Agent, Product AI Agent, Academy AI Agent) in the corresponding Workflow Tool nodes. Activate Workflows: Activate the main workflow and all three sub-flow workflows. Start Chatting: Send a message to your Telegram bot to start interacting with your new RAG chatbot. How to Customize the Workflow Add More Agents: You can create new sub-workflows with specialized agents for different topics (e.g., a "Finance AI Agent"). Simply add a new Workflow Tool node in the main flow and update the Supervisor Agent's system prompt to include the new agent's capabilities. Change Data Sources: Modify the data ingestion part of the workflow to pull data from other sources like Notion, HubSpot, or a CRM by adding the relevant n8n nodes. Adjust the AI Model: You can switch to a different LLM by replacing the OpenAI Chat Model nodes. Modify Prompts: Fine-tune the system prompts in the Agent nodes to alter the personality, instructions, or output format of the chatbot and its specialized agents.
WordPress blog automation with Airtable interface, human review & AI research v2
WordPress Blog Automation with human-in-the-loop and deeper research in Airtable v2 Take full control of your AI-powered content creation with this advanced human-in-the-loop workflow. Designed for power users who demand both automation and editorial oversight, this template transforms Airtable into a command center for producing deeply researched, long-form articles and publishing them directly to WordPress. This system elevates content creation by introducing a hierarchical structure of chapters and subchapters, allowing you to build comprehensive articles, guides, or even e-books with unparalleled detail. From initial research to final publication, you guide the AI at every critical step \- from content structure to the final visuals \- ensuring the final output is high-quality, brand-aligned, and perfectly structured. This version v2 is a major upgrade from the HUMAN-IN-THE-LOOP Content Automation Pro with Deep Research & Airtable for Power Users \- Collaborative AI for WordPress Blog Automation. For more powerful n8n templates, visit our website at aiautomationpro.org. --- What's New in V2: Deeper Research & More Control This version introduces significant upgrades for creating more authoritative and well-structured content: Conditional Deeper Research: The workflow now generates both chapters and subchapters, allowing you to create more detailed, long-form articles with a clear, logical flow. Granular Research and Writing: The AI performs research and writes content at the subchapter level, resulting in more in-depth and comprehensive articles before automatically compiling them into full chapters. Manual Image Override: Gain full control over your article's visuals. You can now manually upload your own images for both the featured image and individual chapters, overriding the AI-generated suggestions. Multi-Language Support: You can now define a target language in the Airtable settings, enabling the AI to generate content for different global audiences. Dynamic WordPress Categorization & Tagging: The AI intelligently assigns your post to the most relevant existing WordPress categories and generates a list of relevant tags, improving on-site organization and SEO. Simplified Architecture with Native Perplexity Node: Thanks to updates in n8n's Perplexity node, the separate "Research Tool" sub-workflow has been eliminated. All research calls are now made directly within the Main Flow. This simplifies the template's structure from three workflows down to two, making it easier to set up, manage, and debug. --- What it does Fully automated content generation tools often lack the nuance, accuracy, and strategic control necessary for truly impactful content. This workflow solves that critical gap by integrating powerful AI capabilities into a structured, human-supervised content creation process. It automates the most repetitive tasks \- like research gathering and chapter ideation \- while embedding essential human review points at critical junctures. Instead of simply providing a topic and receiving a finished article of uncertain quality, you actively guide the process step-by-step. This approach makes it perfect for creating high-quality, deeply researched, and brand-aligned blog posts for WordPress more efficiently, without ever sacrificing editorial control. --- Who is this for? This workflow template is meticulously designed for individuals and teams who seek a powerful blend of AI-driven efficiency and human-controlled quality assurance: Content Creators & Bloggers: Who want to leverage AI for drafting and research but maintain full editorial control. Marketing Teams: Looking to scale content production while ensuring brand voice and quality consistency. SEO Specialists: Needing to produce well-researched, structured, and SEO-optimized content regularly. Agencies: Managing content creation for multiple clients with a structured, repeatable process. Anyone who prefers a "human-in-the-loop" approach over fully automated "black box" content generators. --- How it works This template automates the WordPress content creation process using Airtable as the central hub and leveraging AI for research and copywriting. The system is composed of four interconnected processes within a single workflow, each triggered by specific changes in Airtable. Content Creation Process in Airtable The entire journey from idea to published post is managed within your Airtable base. Configure Settings: Define global parameters (website details, target audience, writing style, language, max word count, numbers of chapters and subchapters, etc.) in the “Settings” table. Create Topics: Add a new blog post idea and trigger the first process. Generate Chapters: The workflow performs online research and generates potential chapters and subchapters based on your topic. Select Chapters to Write: Review the suggested chapters and trigger the content generation phase. Generate Content: The second process researches each subchapter and generates draft content for your review and modification. Select Chapter Content: Approve the content for each chapter. Select Chapter Images: After content is approved, the workflow generates AI images for each chapter. In Airtable, you can review these images and choose to either keep them or manually upload your own for each chapter before triggering the final assembly. Finalize Post: The next process aggregates the content and images, generates the featured image (which you can also manually override in this step), creates the title and SEO metadata, and places the compiled information in the “Finalize Post” table. Publish & Backup Post: The final process publishes the post to your website and creates a backup record with the live URL. n8n Workflow Functions The automation is handled by four separate triggers within the main workflow: Flow 1 (Topic Initiation & Chapter/Subchapter Generation): Fetches settings, performs initial research, and uses AI to generate chapter and subchapter outlines. Flow 2 (Content Generation & Internal Linking): Gathers internal links, performs deep research per subchapter, and uses AI to write draft content. Flow 3 (Post Assembly & Image Generation): Aggregates text, uses AI for metadata and image prompts, generates chapter images (with manual override), converts content to HTML, and saves the compiled post to Airtable. Flow 4 (WordPress Publishing & Backup): Fetches finalized data, uploads the selected images, creates the WordPress post with dynamically assigned categories, and creates a backup record. --- Unique Features Human-in-the-Loop Design: Guarantees quality through mandatory user review and approval stages within Airtable. Airtable as Control Center: Utilizes Airtable as an intuitive interface to manage the entire content lifecycle. Manual Image Override: Maintain complete visual control by manually uploading your own featured and chapter images, overriding the AI-generated options at any stage. Conditional Deeper Research: Choose on a per-topic basis whether to generate simple chapters or a more detailed structure with chapters and subchapters for maximum depth. Multi-Language Content Generation: Define your desired output language in the Airtable settings to create content for different global audiences. Multiple-Image Generation: Generates and adds unique AI images for each chapter, as well as a featured image for the article. Automatic Categorization: The AI intelligently assigns your post to the most relevant existing categories on your WordPress site. AI-Powered Tag Generation: The workflow automatically generates a list of relevant SEO tags for your article to improve discoverability. Advanced Internal & External Linking: Automatically inserts relevant internal links by analyzing your sitemap and includes external source links from its research. Direct WordPress Integration: Streamlines publication by automatically sending finalized content, metadata, tags, images, and categories to your WordPress site. Rate-Limit Aware: Includes configurable Wait nodes to prevent API errors during intensive processing. Native Perplexity Integration: Simplifies online research with n8n's built-in Perplexity node. --- Requirements Airtable Account: A free Airtable account is sufficient to start. WordPress Website: Requires an Application Password with permissions to create posts and upload media. Must have the REST API enabled. OpenAI API Key: For text and image generation. Perplexity API Key: Or an API key for your chosen online research tool. Google Drive: for the backup feature. --- Setup Step-by-Step Import n8n Workflow: Import the workflow JSON file into your n8n instance. Get Airtable Base: Duplicate the companion Airtable Base template. Find the link to the Airtable Base template in the automated email you received after order confirmation. Do not request access to the Airtable base linked in the n8n template itself, as this is a live production base. Configure Credentials: Add credentials in n8n for Airtable, WordPress, OpenAI, Perplexity, and Google Drive. Connect Workflow Nodes: Assign the correct credentials to every relevant node in the workflow. Configure Airtable Nodes: This step is critical. Warning: When you connect your own Airtable base to a node, n8n will automatically erase all pre-configured field mappings. To prevent losing these settings, you must copy them before connecting your base. Here are two recommended methods. Method 1 \- Side-by-Side Comparison: Import the template twice into n8n. Keep one workflow open as a reference, and customize the other. This allows you to easily copy and paste the field mappings from the original to your version after connecting your base. Method 2 \- Text Editor Method: Before connecting your base, open each Airtable node individually, copy its field settings into a text editor for safekeeping, connect your base, and then paste the settings back into the correct fields. Populate Airtable Settings: Fill in your details in the "Settings" table of your Airtable base. Activate Workflow: Toggle the "Active" switch ON for the workflow in n8n. Start Creating: Go to the "Create Topics" table in Airtable to begin. Go through all the tables in Airtable from left to right to complete all the steps of the content creation process and get the final blog post at the end. Finalize SEO in WordPress: The workflow saves the generated SEO meta title and meta description to the Backup Post table in your Google Sheet. After the post is created in WordPress (as a draft), you must manually copy these values from the table and paste them into your SEO plugin's fields (e.g., Yoast, Rank Math) on the WordPress post editor. --- Tips for Pros AI Models: The workflow is optimized for OpenAI's GPT-4o. You can swap in alternatives, but performance may vary. Perplexity's "sonar" model is used for research due to its speed and cost-effectiveness. AI Prompts: Modify prompts in the AI nodes to refine tone, style, or formatting. Integrations: Replace research tools, image generators, or modify the final step to publish to a different CMS. Error Handling: For production reliability, connect an "Error Handling" workflow in n8n to catch failures and send notifications. --- Important Considerations API Rate Limits: The included Wait nodes help mitigate API rate limits, but may need adjustment based on your usage and API plans. Testing Costs: API calls to AI models are not free. Monitor your usage and costs on your provider's billing dashboard. Sequential Processing: The workflow processes one topic at a time to ensure stability.
Automate SEO-Optimized blog creation with GPT-4o, Perplexity AI & multi-language support
WordPress Blog Automation Pro v2.1 – with DEEPER RESEARCH – Advanced Content Automation This advanced, dual-workflow system automates the entire lifecycle of creating in-depth, SEO-optimized blog posts. It transforms a simple topic from a Google Sheet into a fully researched, well-structured, and image-rich article published directly on your WordPress site, with all assets securely backed up to Google Drive. It leverages AI for multi-layered research, content generation, and image creation, streamlining your content pipeline. This version 2.1 is an upgrade from the WordPress Auto-Blogging Pro v2 \- with DEEPER RESEARCH \- Advanced Content Automation. For more powerful n8n templates, visit our website at aiautomationpro.org. What's new in version 2.1 Version 2.1 introduces several upgrades for efficiency and simplicity: Re-architecture of the core AI logic: The initial AI research agent is now more powerful. It not only provides a general overview but also proactively defines and returns the complete chapter structure for the article in a single step. This integration results in a more coherent and logically structured article from the very beginning. Multi-Language Support: The workflow is now designed to support content creation in multiple languages, allowing you to scale your content strategy globally. Simplified Architecture with Native Perplexity Node: Thanks to updates in n8n's Perplexity node, the separate "Research Tool" sub-workflow has been eliminated. All research calls are now made directly within the Main Flow. This simplifies the template's structure from three workflows down to two, making it easier to set up, manage, and debug. Enhanced AI Reliability: The new version uses Structured Output Parsers within the LangChain framework. This ensures the AI's responses are always in a clean, predictable JSON format, drastically reducing errors and making the entire automation more resilient. What problem is this workflow solving? / Use cases Standard content automation often struggles with producing truly in-depth, comprehensive content. This workflow addresses that challenge by: Automating Multi-Level Research: Optionally eliminates the manual effort required to deeply research topics, ensuring content is thorough and well-supported. Generating Long-Form Content: Enables the creation of detailed articles, comprehensive reports, or even initial e-book drafts automatically. Scaling Content Production: Efficiently handles lists of topics from Google Sheets, processing them sequentially for reliable, automated content creation over time. Enhancing SEO Automatically: Integrates best practices like sitemap-based internal linking, external source linking, automatic categorization, and tag generation. Streamlining Complex Tasks: Combines research, writing, image generation, SEO optimization, publishing, and comprehensive backups into a single, automated system. Who is this for? This advanced workflow is designed for demanding users who require robust, comprehensive content automation: Content Marketers & Strategists SEO Professionals Niche Site Builders & Affiliates Agencies Researchers & Analysts Power Users of previous versions ready to upgrade to a more powerful and streamlined architecture. Unique Features Conditional Deeper Research: Choose per-topic whether to activate multi-level research for maximum depth or use standard chapter-level research. Multi-Language Content Generation: Define your desired output language in the Airtable settings to create content for different global audiences. Centralized Control Interface: Google Sheets acts as the primary interface for bulk input, parameter setting, and status monitoring. Dual Trigger Options: Use Google Sheets for batch processing lists of topics or n8n’s Native Form for single, ad-hoc topic submission. Latest AI Image Models: Optimized for high-quality images using OpenAI’s latest models, with easy node setup to switch to alternatives. Multiple-Image Generation: Generates and adds unique AI images for each chapter, as well as a featured image for the article. Automatic Categorization: The AI intelligently assigns your post to the most relevant existing categories on your WordPress site. AI-Powered Tag Generation: The workflow automatically generates a list of relevant SEO tags for your article to improve discoverability. Batch Topic Processing: Handles multiple topic inputs efficiently via the Trigger Flow loop, processing them sequentially with status tracking. Advanced External & Internal Linking: Automatically inserts relevant internal links by analyzing your sitemap and includes external source links from its research. Direct WordPress Integration: Streamlines publication by automatically sending finalized content, metadata, tags, images, and categories to your WordPress site. Comprehensive Backup System: Saves final content in multiple formats and locations: Markdown to Google Docs, Images to Google Drive, Final URLs and details to Google Sheets. Rate-Limit Aware: Includes configurable Wait nodes to prevent API errors during intensive processing. Native Perplexity Integration: Simplifies online research with n8n's built-in Perplexity node. How this workflow works This template utilizes two interconnected n8n flows, orchestrated primarily via Google Sheets. Trigger Flow (Scheduler & Dispatcher): Activates on a schedule or via a form. It reads rows from a Google Sheet where the Status is 'To Do' and executes the Main Flow for each topic, one by one. Main Flow (Content Generation Engine): Setup: Receives parameters from the Trigger Flow and updates the topic's status to 'In Progress'. Research & Planning: Gathers internal links from your sitemap and performs initial online research using the native Perplexity node. A LangChain-based AI agent then outlines the entire article. Conditional Content Creation: Based on the Have Deeper Research flag, it either performs multi-level research or standard chapter-level research. Image Generation & Upload: Generates and uploads a featured image and images for each chapter to WordPress and Google Drive. Publishing & Backup: Assembles the final article, converts it to HTML, publishes it to WordPress with all SEO metadata, and saves comprehensive backups to Google Sheets and Google Docs. Finalize: Updates the topic's Status to 'Done' in the Google Sheet. Requirements n8n Instance OpenAI API Key Perplexity API Key WordPress Website (REST API enabled, with an Application Password) Google Account (for Sheets, Drive, and Docs) Setup Step-by-Step Import Workflows: Download and import the two .json files (Trigger Flow and Main Flow). Configure Google Sheet: Find the link to the Google Sheet template in the automated email you received after your order confirmation. You must make your own copy of this sheet. Do not request access to the original link. The sheet has two tabs: Create Topic and Final Blogs. Ensure the column headers in your copy match those used in the workflow nodes. Create Google Drive Folder: In your Google Drive, create a new folder where all your content backups (documents and images) will be stored. Copy the Folder ID from the URL (it's the string of letters and numbers at the end). Link Flows: In the Trigger Flow, open the "Execute Workflow" node and select your imported Main Flow from the dropdown menu. Configure Credentials: In n8n, add credentials for OpenAI, Perplexity, WordPress, and Google. Connect Workflow Nodes: Open both workflows and assign the correct credential to each relevant node. Update the "Google Sheets" nodes with your Sheet ID and the "Google Drive" nodes with the Folder ID you created in step 3\. Initial Test Run: Add a test topic to your sheet, manually trigger the workflow, and verify the process completes successfully. Activate Workflow: Toggle the "Active" switch ON for the Trigger Flow. The Main Flow should remain inactive as it is triggered by the other flow. Finalize SEO in WordPress: The workflow saves the generated SEO meta title and meta description to the Final Blogs tab in your Google Sheet. After the post is created in WordPress (as a draft), you must manually copy these values from the sheet and paste them into your SEO plugin's fields (e.g., Yoast, Rank Math) on the WordPress post editor. How to customize the workflow Adjust the Schedule: Change the interval in the "Schedule Trigger" node of the Trigger Flow to control how often it checks for new topics. Change Language: To generate content in a different language, open the Main Flow, go to the Global Configuration node, and update the language field to your desired language (e.g., "Spanish", "French", "German"). Refine AI Prompts: Modify the prompts in the OpenAI nodes within the "Main Flow" to fine-tune the writing style, tone, and structure of your articles. Change Image Style: Edit the prompts in the "Generate Image" section to alter the style of the generated images to match your brand. Customize Post Status: Change the default publishing status in the "WordPress" node from "draft" to "publish" if you want to post directly without a final review.