Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    How to self-host n8n on Hostinger VPS

    June 13, 2026

    n8n_community_packages_allow_tool_usage: How to Configure It

    June 12, 2026

    n8n access blocked Google verification process fix

    June 12, 2026
    n8n Automation Tutorialn8n Automation Tutorial
    • Home
    • n8n AI Workflows & Tool Comparisons
    • n8n Integrations & Nodes
    • n8n Setup & Self-Hosting
    • AI Automation & Enterprise Workflows
    • n8n Security & Vulnerabilities
    • n8n Tutorials & Comparisons
    • Contact Us
    Home ยป Blog research and writer n8n workflow: Build An AI System That Writes Viral Posts
    n8n AI Workflows & Tool Comparisons

    Blog research and writer n8n workflow: Build An AI System That Writes Viral Posts

    Olaitan OladipoBy Olaitan OladipoMay 24, 2026Updated:May 24, 2026No Comments7 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp VKontakte Email
    Complete n8n AI blog research and writing workflow
    The full workflow uses a form input, outline generator, research agent, editor agent, title generator, and Gmail delivery step.
    Share
    Facebook Twitter LinkedIn Pinterest Email

    This guide shows how to build an AI-powered blog research and writing workflow in n8n. The system takes a topic, audience, and tone, then uses multiple AI steps to research, outline, write, edit, title, and email a finished article.

    What This Workflow Builds

    • A form that collects the post topic, target audience, and tone of voice.
    • A Newsletter Expert agent that researches the topic and creates a table of contents.
    • An OpenAI outline step that converts the table of contents into individual sections.
    • A Research Agent that researches each section separately using a research tool such as Perplexity.
    • A Merge and Aggregate layer that combines all section drafts into one payload.
    • An Editor agent that produces a polished HTML article with citations and sources.
    • A title generator and Gmail delivery step that sends the finished post to your inbox.
    Complete n8n AI blog research and writing workflow
    The full workflow uses a form input, outline generator, research agent, editor agent, title generator, and Gmail delivery step.

    Step 1: Collect the Blog Inputs

    Start with a simple form. The workflow needs three inputs: the post topic, the target audience, and the tone of voice. In the demo, the topic is something like AI in Finance, the audience is investment bankers, and the tone is direct. For the previous guide in this series, read n8n vs LangChain: 6 Key Differences Between a Workflow Automation Platform and an AI Development Framework in 2026.

    Newsletter form inputs for blog topic audience and tone
    The workflow starts with three simple inputs: post topic, target audience, and tone of voice.

    Inside n8n, the Form Trigger gives you a test URL for manual testing and a production URL for activated workflows. You can also add authentication if the form should not be public.

    n8n Form Trigger configuration with form URL redacted
    The Form Trigger provides test and production URLs, optional authentication, and the Newsletter Form title. The unique form URL is redacted.

    Step 2: Normalize the Incoming Variables

    The form submission includes extra metadata, such as submission time and form mode. Use an Edit Fields or Set Variables node to keep only the values the AI agents need.

    Set Variables node for topic audience and tone
    The Set Variables step keeps only the values the rest of the workflow needs: topic, target audience, and tone of voice.
    topic = {{$json["Post Topic"]}}
    targetAudience = {{$json["Target Audience"]}}
    toneOfVoice = {{$json["Tone of Voice"]}}

    Step 3: Create the Table of Contents

    The first AI Agent is a Newsletter Expert. It receives the topic, target audience, and tone, then uses a research tool to create a stronger table of contents than a single one-shot prompt would produce.

    Newsletter Expert AI Agent prompt in n8n
    The first Tools Agent acts as a newsletter expert and uses the user inputs plus research tools to produce a table of contents.

    The output is a researched table of contents. This is the strategic layer of the system: it decides what the article should cover before any section writing begins.

    Table of contents output from the newsletter expert agent
    The first agent returns a researched table of contents that becomes the foundation for the article.

    Step 4: Split the Outline into Sections

    Next, use an OpenAI text operation to convert the table of contents into structured section objects. This step asks the model to output each article section separately in a field such as newsletterSections.

    OpenAI node prompt for splitting newsletter outline
    The Generate Outline step asks OpenAI to split the table of contents into structured sections.
    Return an array of sections.
    Each section should include:
    - title
    - description
    
    Output field: newsletterSections

    Once the outline is an array, the workflow can split it into multiple items. Each item becomes one section that the Research Agent can process independently.

    Newsletter outline array output with multiple sections
    The outline is returned as an array so each section can be processed as its own item.

    Step 5: Research Each Section Separately

    The Research Agent receives one section at a time. Its user message includes the section title, section description, target audience, and tone of voice. This gives the agent enough context to write one strong section instead of trying to write the entire post at once.

    Research Agent input for one newsletter section
    Each outline section is sent to the Research Agent with its title, description, audience, and tone.

    The system prompt gives the Research Agent rules for writing, citations, tone, and source quality. In the video, the agent uses a Claude model for writing quality and a research tool such as Perplexity for current source discovery.

    Research Agent system prompt with Claude and Perplexity tools
    The Research Agent uses a structured system prompt and research tooling to write evidence-backed section content.

    For production content, keep a human review step. AI research can be useful, but links, claims, and statistics still need editorial checking before publishing.

    Step 6: Merge Research Back with the Outline

    After each section is researched, the Merge node combines the research output with the corresponding outline metadata. This keeps the final editor aware of both the section title and the researched content.

    Merge node combining research output and outline data
    The Merge node joins each researched section with its matching outline title and description.

    Then the Aggregate node turns the four separate section items into one combined object. That object is easier to send into a final editor agent than four independent items.

    Aggregate node combining four researched sections
    The Aggregate node turns multiple section items into one combined payload for the editor.

    Step 7: Use an Editor Agent to Produce the Final Blog

    The Editor Agent receives the aggregated titles and section drafts. Its job is not to research from scratch; its job is to refine, format, and turn the drafts into a coherent article.

    Editor AI Agent prompt for citations and final article structure
    The editor prompt asks for a polished HTML article with citations, sections, and source handling.

    The editor prompt should ask for HTML output, clear headings, clickable citations, and a source section. The video also limits the output size so the automation is less likely to fail from overly long model responses.

    Final HTML blog output from the editor agent
    The editor agent returns formatted HTML with headings, paragraphs, links, and source references.

    Step 8: Generate the Title and Send the Email

    After the final article exists, add a smaller title-generation step. The prompt should ask for one plain-text title only, with no quotation marks or extra commentary. That title becomes the email subject line.

    Finally, connect Gmail or another email node. Set the message type to HTML so headings, links, and formatting display correctly. In the screenshot below, the recipient has been redacted.

    Gmail node sending HTML newsletter with recipient redacted
    The Gmail node sends the article as HTML, uses the generated title as the subject, and has the recipient redacted.

    The result is an email containing a formatted article and a source list. This source list is important because it gives editors a place to start fact-checking before the blog is published.

    Final emailed article with sources section
    The delivered email includes a source list so the generated article can be reviewed and verified.

    How to Make It Run Automatically

    • Replace the manual form with a Google Sheet of topics and audiences.
    • Add a Schedule Trigger to run daily, weekly, or monthly.
    • Send drafts to Gmail, Slack, Notion, Google Docs, or WordPress instead of only email.
    • Add a human approval step before publishing to avoid low-quality or inaccurate AI content.
    • Store generated titles, sources, and article status in a spreadsheet or database for tracking.

    Quality and Safety Checklist

    • Do not publish AI-written articles without checking facts, citations, and source credibility.
    • Keep API keys inside n8n credentials instead of hard-coding them in prompts or screenshots.
    • Use a clear brand voice guide so the editor agent does not produce generic copy.
    • Avoid asking for fake citations. Require real links and verify them before publication.
    • Add plagiarism checks and originality review if the article will be used for SEO.
    • Use internal links and real expertise to make the article more useful than a generic AI summary.

    Useful References

    Official docs used for this guide: n8n Form Trigger, n8n Edit Fields / Set, n8n AI Agent, n8n OpenAI Text operations, n8n Anthropic Chat Model, n8n Split Out, n8n Merge, n8n Aggregate, and n8n Gmail node.

    Olaitan Oladipo

    Olaitan Oladipo holds a BSc in Sociology from Olabisi Onabanjo University. He is a self-taught automation builder who has spent years inside n8n doing the work that most tutorials skip: debugging OAuth errors at 2am, migrating client automations from Make.com mid-project, fighting reverse proxy misconfigurations on AWS EC2, and figuring out through trial and error what actually holds up in production versus what only looks clean in a demo.

    He is not a developer by training and not a SaaS founder. He is the person in the Discord server who actually answers the question instead of linking to the docs.

    His writing on n8n Automation Tutorial covers self-hosting, AI agent workflows, tool comparisons, and the security vulnerabilities the automation industry would rather not discuss. He has built AI-assisted invoice approval flows using OpenAI function calling, connected Claude via HTTP Request nodes, and holds considered opinions about Zapier, Make.com, LangChain, and CrewAI that their marketing teams would not appreciate.

    He writes for people who are technical enough to follow a tutorial but experienced enough to want the honest version.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp Email
    Previous Articlen8n vs LangChain: 6 Key Differences Between a Workflow Automation Platform and an AI Development Framework in 2026
    Next Article Mercedes-Benz Ditched Its Legacy Automation Stack for n8n. Every Fortune 500 IT Department Is Paying Attention.
    Olaitan Oladipo
    • Website

    Olaitan Oladipo holds a BSc in Sociology from Olabisi Onabanjo University. He is a self-taught automation builder who has spent years inside n8n doing the work that most tutorials skip: debugging OAuth errors at 2am, migrating client automations from Make.com mid-project, fighting reverse proxy misconfigurations on AWS EC2, and figuring out through trial and error what actually holds up in production versus what only looks clean in a demo. He is not a developer by training and not a SaaS founder. He is the person in the Discord server who actually answers the question instead of linking to the docs. His writing on n8n Automation Tutorial covers self-hosting, AI agent workflows, tool comparisons, and the security vulnerabilities the automation industry would rather not discuss. He has built AI-assisted invoice approval flows using OpenAI function calling, connected Claude via HTTP Request nodes, and holds considered opinions about Zapier, Make.com, LangChain, and CrewAI that their marketing teams would not appreciate. He writes for people who are technical enough to follow a tutorial but experienced enough to want the honest version.

    Related Posts

    n8n vs Power Automate: 6 Key Differences in Pricing, Features, and Use Cases

    May 26, 2026

    LangGraph vs n8n: 2 Frameworks, 5 Core Differences, and Which One Fits Your AI Workflow in 2025

    May 26, 2026

    Dify vs n8n – 7 Key Differences Between an AI App Builder and a Workflow Automation Platform

    May 25, 2026

    Flowise vs n8n: 7 Key Differences in AI Agent Building and Workflow Automation

    May 25, 2026
    Leave A Reply Cancel Reply

    Recent Posts
    • How to self-host n8n on Hostinger VPS
    • n8n_community_packages_allow_tool_usage: How to Configure It
    • n8n access blocked Google verification process fix
    • Unrecognized node type n8n-nodes-mcp.mcpclienttool
    • Unrecognized node type n8n-nodes-base.executecommand
    • n8n Community License Activation Error: Fix Connection Failed on npm Self-Hosting
    • Your Agent Passed the Demo. Nobody Can Explain What It Did at 3am.

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    About Us

    n8n Automation Tutorial is a free resource for developers, freelancers, and business owners who want to build and deploy n8n workflows. Tutorials cover self-hosting, Docker, AWS, API integrations, and real-world automation use cases - from beginner setups to production-ready deployments.

    n8n Automation Tutorial
    • Contact Us
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    © 2026 n8n Automation Tutorial.

    Type above and press Enter to search. Press Esc to cancel.