Articles

Build a Blog Research and Writer n8n Workflow: Complete Guide

Writing quality blog posts takes hours of research, drafting, and editing. What if we could automate most of that work while still producing articles that sound genuinely human?

That’s exactly what we’re going to build today - a complete blog research and writer n8n workflow that handles everything from topic research to final article creation. By the end of this tutorial, we’ll have an automated system that can research any topic thoroughly and write engaging blog posts in minutes, not hours.

  • Learn how to plan and conduct user research, analyze user data, and share research insights by creating a research report.
    • Beginner Friendly.
      1 hour
  • Learn to conduct faster, more thorough research using Perplexity AI's search modes, citation system, and collaborative features.
    • Beginner Friendly.
      1 hour

What is n8n and why use it for blog workflows

n8n is an open-source workflow automation tool that connects different apps and services without requiring complex coding. An n8n workflow consists of connected nodes where each node performs a specific task - like gathering data, processing information, or saving files.

For blog creation specifically, n8n workflows eliminate the manual steps of researching topics, writing content, and organizing finished articles. Instead of spending hours jumping between research tools, writing applications, and file storage, we can automate the entire content creation pipeline.

Our blog research and writer n8n workflow demonstrates this automation in action by transforming a simple topic submission into a fully researched, AI-written article delivered as a downloadable file - all without manual intervention between steps.

If you want to learn more about n8n and its capabilities, check out this article on n8n workflows.

Now that we understand how n8n can improve our content creation process, let’s start building our automated blog workflow from scratch.

Create a blog research and writer n8n workflow

Building our automated content creation system starts with setting up the foundation. Our blog research and writer n8n workflow will have four main components:

  • Form Trigger: Collects our blog topic and preferences
  • Research Node: Gathers detailed information about the topic
  • Writing Node: Creates a human-quality article from the research
  • Storage Node: Saves the finished article as a downloadable file

We’ll build this n8n blog automation step-by-step, starting with the foundation workflow setup and form trigger configuration. The remaining components will be built in the upcoming sections, with data flowing automatically from one node to the next.

Step 1: Set up our new n8n workflow

First, we need to create a new workflow in n8n:

  1. Log in to your n8n account (cloud or self-hosted)
  2. Click the “+” button to create a new workflow
  3. Name it “Blog Research and Writer Workflow”
  4. Save the workflow so we don’t lose our progress

n8n canvas for blog research and writer workflow

The n8n canvas is where we’ll build our automation. Think of it as a flowchart where each box (called a “node”) performs a specific task, and the arrows show how data flows between them.

Step 2: Add the form trigger for blog topics

Now we’ll create an easy way to input blog topics:

  1. Click the “+” button on the canvas
  2. Search for “Form Trigger” and add it
  3. This creates a web form that will start our workflow

n8n workflow form node

Let’s configure the form with the information we need:

  • Form setup:
    • Form Title: “Blog Article Generator”
    • Form Description: “Enter your blog topic and preferences”
  • Add these fields:
    • Blog Topic (Text field, Required: Yes)
    • Target Audience (Text field, Required: No, Default: “general audience”)
    • Article Length (Text field, Required: No, Default: “1000”)

blog research and writer n8n workflow form input fields

After saving, n8n will give us a unique URL for this form. We can bookmark this URL and use it anytime we want to generate a new blog post. blog research and writer n8n workflow form links

With our form trigger ready to collect blog topics, let’s add the research component that will automatically gather detailed information on any subject we submit.

Setting up automated research in your n8n blog workflow

Good research forms the foundation of every great blog post. Instead of spending hours manually gathering information, we’ll automate this process using AI-powered research tools that can search the web and compile detailed information in minutes.

Step 1: Add the Perplexity research node

Perplexity AI is perfect for blog research because it searches the web in real-time and provides citations:

  1. Click the “+” connector from your Form Trigger
  2. Search for “Perplexity” in the node library
  3. Add the Perplexity node
  4. Connect it to your Form Trigger

blog research and writer n8n workflow perplexity node search

Step 2: Configure Perplexity API credentials

To use Perplexity in our n8n workflow, we need API access:

  1. Go to perplexity.ai and sign up
  2. Navigate to API settings and create a new API key
  3. Copy your API key

Back in n8n:

  1. Click on the Perplexity node
  2. Click “Create New Credential”
  3. Paste your API key
  4. Save the credential

n8n workflow perplexity api credentials

In the second field labeled “Operation,” select “Message a model.” Then, in the next field called “Model,” choose the specific model you want.

n8n workflow perplexity message a model and model fields

Step 3: Create effective research prompts

The quality of our research depends heavily on how we ask for information.

Important: Before adding the prompt, make sure to execute the previous nodes (Form Trigger) first. This allows n8n to recognize the available input values. If you see the placeholder text in red color, it means n8n can’t find that input field yet.

Once you’ve executed the previous nodes, you’ll see available input values on the left side of the Perplexity configuration form. You can drag and drop these values directly into your prompt.

blog research and writer n8n workflow input fields drag and drop gif

In the Messages Text field, add this research prompt:

You are an expert researcher conducting an in-depth analysis. Research the topic: {{ $json['Blog Topic'] }}
Provide a detailed research report covering ALL of the following areas:
FUNDAMENTAL ANALYSIS:
- Clear definition and core concepts
- Historical context and evolution
- Key terminology and classifications
- Main categories or types
CURRENT STATE & TRENDS:
- Latest developments and breakthroughs (2023-2025)
- Current market size, growth rates, and projections
- Emerging trends and future predictions
- Recent studies, reports, and research findings
DATA & STATISTICS:
- Key metrics, percentages, and quantitative data
- Comparative analysis with previous years
- Regional/global variations and statistics
- Industry benchmarks and performance indicators
EXPERT INSIGHTS:
- Opinions from leading experts and thought leaders
- Quotes from recent interviews or publications
- Different perspectives and viewpoints
- Controversial aspects or debates
REAL-WORLD APPLICATIONS:
- Current use cases and implementations
- Success stories and case studies
- Practical examples from major companies/organizations
- Tools, technologies, and platforms being used
OPPORTUNITIES & CHALLENGES:
- Benefits and advantages
- Limitations, risks, and challenges
- Barriers to adoption or implementation
- Solutions and workarounds are being developed
FUTURE OUTLOOK:
- Predictions for the next 2-5 years
- Upcoming innovations or changes
- Potential disruptions or game-changers
- Investment trends and funding activities
CREDIBLE SOURCES:
- Include specific citations from authoritative sources
- Reference recent academic papers, industry reports
- Link to government data, official studies
- Mention reputable news outlets and publications
Make this research detailed enough to write an authoritative blog post. Focus on accuracy, depth, and current relevance.

blog research and writer n8n workflow message field

This prompt makes sure our blog research and writer workflow gets thorough, well-sourced information for any topic.

Adding AI content writing to the blog research n8n workflow

Now we’ll take our research data and turn it into engaging, human-quality blog content using AI writing tools. This step converts all the detailed information we gathered into articles that sound natural and engaging.

Step 1: Choose and add our AI writing node

For this tutorial, we’ll use Google’s Gemini because it’s cost-effective and produces high-quality content:

  1. Click the “+” connector from your Perplexity node
  2. Search for “Google Gemini”
  3. Add the node

blog research and writer n8n workflow google gemini search

If you prefer OpenAI, the setup process is similar, just search for “OpenAI” instead.

Step 2: Set up AI writing credentials

To use Gemini in our n8n workflow:

  1. Go to Google AI Studio
  2. Click “Get API Key”
  3. Create a new API key and copy it

In n8n:

  1. Click on your Gemini node
  2. Click “Create New Credential”
  3. Paste your Google AI API key
  4. Save the credential

blog research and writer n8n workflow google gemini api crendentials

Step 3: Create human-quality writing prompts

This is where our blog research and writer workflow really shines. We’ll use a detailed prompt that produces content that sounds genuinely human.

Important: Execute the previous nodes first (Form Trigger and Perplexity) so n8n recognizes all available input values. You’ll then see the research data and form inputs on the left side that you can drag and drop into your prompt.

Configure these Gemini parameters:

  • Resource: Text
  • Operation: “Message a Model”
  • Model: “gemini-2.5-flash”

In the Messages Prompt field, we’ll pull data from two sources:

  • From Perplexity: We’ll use {{ $json.choices[0].message.content }} to get the research content
  • From Form: We’ll use the blog topic, target audience, and article length from our form submission

Add this complete writing prompt:

You are a skilled human writer who specializes in creating clear, helpful content that real people actually want to read. Your writing feels natural and conversational, like you're explaining something to a friend over coffee.
# YOUR TASK:
Write a genuinely helpful blog post using this research data. Make it feel like it was written by a human, for humans.
# RESEARCH DATA:
{{ $json.choices[0].message.content }} {{ $json.search_results }}{{ $json.citations }}
# ARTICLE DETAILS:
- **Topic:** {{ $('On form submission').item.json['Blog Topic'] }}
- **Target Audience:** {{ $('On form submission').item.json['Target Audience'] }}
- **Target Length:** {{ $('On form submission').item.json['Article Length'] }}
# WRITING STYLE RULES:
## HUMAN WRITING APPROACH:
- Write like you're having a conversation with a smart friend
- Use "you" and "your" to speak directly to readers
- Keep sentences short and punchy (15-20 words max)
- Break up long paragraphs (3-4 sentences maximum)
- Use contractions naturally (you'll, it's, don't, won't)
- Include personal opinions and perspectives
- Add transitional phrases that humans actually use
## AVOID THESE AI RED FLAGS:
Never use these overused AI phrases:
- "In today's digital landscape"
- "Comprehensive guide"
- "Dive deep into"
- "Unlock the secrets"
- "Game-changing"
- "Revolutionary"
- "Cutting-edge"
- "Seamless"
- "Robust"
- "Streamline"
- "Leverage"
- "Optimize"
- "Harness the power"
- "It's worth noting that"
- "In conclusion"
## CONTENT APPROACH:
**For Technical Topics:**
- Explain complex concepts like you're teaching a 12-year-old
- Use everyday analogies ("Think of it like...")
- Define technical terms immediately in plain English
- Include "Why this matters" explanations
**For How-To Content:**
- Start with clear, numbered steps
- Add screenshots or examples where helpful
- Include "Pro tips" or "Common mistakes" boxes
- Test each step as if you're following it yourself
**For Conceptual Content:**
- Use real-world examples people can relate to
- Include specific case studies or stories
- Break abstract ideas into concrete benefits
- Add "What this means for you" sections
## SEO REQUIREMENTS:
- Include the main topic keyword in the title naturally
- Use the keyword 2-3 times in the first 100 words
- Add related keywords throughout (but only where they fit naturally)
- Create H2 headers that people would actually search for
- Include semantic keywords (related terms people use)
## READABILITY RULES:
- Keep paragraphs to 2-4 sentences max
- Use bullet points and numbered lists liberally
- Add subheadings every 200-300 words
- Include transitional words between paragraphs
- Vary sentence length (mix short and medium sentences)
- Use active voice, not passive
- Replace jargon with everyday words
Write the complete article now. Remember: helpful, human, and genuinely useful.

Remember: Drag and drop the input values from the left panel instead of typing the placeholders by hand.

Building article storage for the blog writer n8n workflow

We need a simple way to save and organize our generated articles. We’ll use a code node that creates downloadable markdown files—no complex setup or additional services are required.

Step 1: Add a code node for file storage

  1. Click the “+” connector from your Article Writer (Gemini) node
  2. Search for “Code” and add the node

blog research and writer n8n workflow code search

The code node lets us write simple JavaScript to process our article data and create a downloadable file. This approach is much simpler than setting up cloud storage or dealing with complex file management systems.

Step 2: Configure article download settings

In the Code node, we’ll add JavaScript, which takes our generated article and prepares it for download. The code will:

  • Extract the article content from Gemini’s response
  • Create a meaningful filename using the blog topic and the current date
  • Add metadata to help organize our articles
  • Format everything as a proper markdown file

Paste this JavaScript code into the Code node:

const article = $input.first().json.content.parts[0].text
const topic = $('On form submission').first().json['Blog Topic']
const filename = `${topic.replace(/[^a-z0-9]/gi, '_')}_article.md`;
return [{
json: {
topic: topic,
filename: filename
},
binary: {
data: {
data: Buffer.from(article, 'utf8').toString('base64'),
mimeType: 'text/markdown',
fileName: filename
}
}
}];

This code pulls the article text from Gemini’s response format (candidates[0].content.parts[0].text) and combines it with the topic information from our original form submission.

When we execute this node, it will create a properly formatted markdown file that we can download directly from n8n, open in any text editor, or import into our content management system.

blog research and writer n8n workflow code parameters

Now let’s test our complete blog research and writer n8n workflow to make sure everything works together smoothly from start to finish.

Testing the complete blog research and writer n8n workflow

At this point, our canvas should show four connected nodes: Form Trigger → Perplexity research → Article Writer → Save Article. This complete chain represents our automated content creation system.

blog research and writer n8n workflow complete workflow

Let’s put our finished automation through its paces and see what it can create.

Run our first complete test

Time to test the entire blog research and writer workflow:

  • Click “Execute Workflow”
  • Fill out the form with our test example:
    • Blog Topic: “What is n8n”
    • Target Audience: “Small business owners”
    • Article Length: “1000”
  • Submit the form and watch each node execute in sequence

blog research and writer n8n submit the form

The workflow should progress through each step:

  • Form submission captures our inputs
  • Perplexity researches “What is n8n”
  • Gemini writes a 1000-word article for small business owners
  • Code node creates a downloadable markdown file

blog research and writer n8n complete workflow

Evaluate our generated content

Once the workflow completes:

  • Click on each node to review its output
  • Download the generated markdown file from the Save Article node
  • Open the file to review the complete article
  • Check these quality indicators:
    • Research depth: Does the article include current information about n8n’s features and use cases?
    • Writing quality: Does it sound conversational and avoid AI buzzwords?
    • Target audience: Is it written for small business owners rather than developers?
    • Length: Did it hit close to our 1000-word target?
    • Structure: Are there clear headers, short paragraphs, and good flow?

n8n workflow generated article

If the results look good, our blog research and writer n8n workflow is ready to generate high-quality content automatically. Each execution costs only a few cents in API fees but saves hours of manual research and writing work.

Our automated content creation system is now complete and ready to produce professional blog posts on any topic we submit.

Conclusion

We’ve built a complete blog research and writer n8n workflow that automates the most time-consuming parts of content creation.

Here’s what our workflow accomplishes:

  • Detailed research in minutes instead of hours
  • Human-quality writing that engages readers naturally
  • Automatic organization with properly formatted, downloadable files
  • Consistent quality regardless of topic complexity

This n8n workflow runs entirely automatically once we submit a topic. We can generate multiple articles on different subjects, each one thoroughly researched and professionally written.

Next steps: Start with simple topics to get comfortable with the system, then gradually tackle more complex subjects as you see how well it performs. Consider taking this course on Generative AI to learn how we can create content with AI.

Remember, the goal isn’t to replace human creativity - it’s to handle the heavy lifting of research and initial drafting so we can focus on strategy, editing, and adding our unique insights to the generated content.

Frequently asked questions

1. How to execute workflow in n8n?

To execute workflow in n8n, click the “Execute Workflow” button in the top toolbar, or use the webhook/form URL if you’ve set up external triggers like we did with our Form Trigger.

2. What is an n8n workflow?

An n8n workflow is a series of connected nodes that automate tasks between different apps and services. Each node performs a specific action, and data flows automatically from one node to the next.

3. How to share n8n workflows?

To share n8n workflows, go to the workflow menu and select “Export” to download the configuration file. You can export workflows as JSON files and share them with others.

4. What does n8n stand for?

n8n stands for “nodemation” - a combination of “node” and “automation” that describes how the platform connects different services through visual nodes.

5. Is n8n better than Zapier?

n8n offers more flexibility and better pricing for complex workflows like our blog research and writer system. While Zapier charges per task, n8n charges per workflow execution, making multi-step automations much more cost-effective.

Codecademy Team

'The Codecademy Team, composed of experienced educators and tech experts, is dedicated to making tech skills accessible to all. We empower learners worldwide with expert-reviewed content that develops and enhances the technical skills needed to advance and succeed in their careers.'

Meet the full team

Learn more on Codecademy

  • Learn how to plan and conduct user research, analyze user data, and share research insights by creating a research report.
    • Beginner Friendly.
      1 hour
  • Learn to conduct faster, more thorough research using Perplexity AI's search modes, citation system, and collaborative features.
    • Beginner Friendly.
      1 hour
  • Build your skills in user experience research. Learn user research methods, user experience research tools, and enhance your career in UX.
    • With Certificate
    • Intermediate.
      1 hour