🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

OpenAI + Google Sheets, blog drafts ready to polish

Lisa Granqvist Partner Workflow Automation Expert

Your content backlog isn’t stuck because you “lack ideas.” It’s stuck because every topic turns into a messy, time-heavy writing session, and the first draft still needs a full rewrite.

Content marketers feel it when deadlines pile up. Agency owners feel it when clients want “two more posts this week.” And founders writing between meetings run into the same wall. This OpenAI Sheets drafts automation turns a simple topic list into structured blog drafts you can actually polish and publish.

You’ll see how the workflow creates an outline first, expands each section consistently, and delivers clean HTML and Markdown outputs you can drop into your CMS.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: OpenAI + Google Sheets, blog drafts ready to polish

The Problem: Blog drafts take forever to get “usable”

Most teams don’t struggle to create content. They struggle to create content that’s structured, consistent, and easy to finish. You start with a topic, open a doc, and then spend an hour just deciding what the sections should be. When you do use AI, it often dumps one giant blob of text with weak headings, repetitive phrasing, and random keyword placement. Then comes the worst part: editing. Not polishing. Editing because the draft isn’t shaped like a real article yet.

The friction compounds. A little chaos in the outline turns into a lot of cleanup later.

  • Outlines get skipped, so you end up rewriting the structure halfway through.
  • One-pass AI drafts drift in tone and repeat themselves, which makes editing feel endless.
  • SEO basics (headings, keyword consistency, readable sections) become a manual checklist every single time.
  • “Just write faster” becomes the plan, and frankly that’s not a plan.

The Solution: Google Sheets topics → outline-first drafts from OpenAI

This workflow takes a single topic (mapped from a simple input) and turns it into a structured article in stages, so the output is predictable and easier to publish. First, it prompts OpenAI to generate a clean outline based on your topic, language, desired depth, and keyword focus. Then it extracts each subtopic from that outline and loops through them one-by-one. For every section, it asks OpenAI to expand the subtopic into a detailed paragraph that matches the same style and SEO intent. Finally, it aggregates all sections and builds two ready-to-use outputs: a clean JSON object and a Markdown draft, plus HTML assembled from the JSON.

The workflow starts from a manual trigger (or a row/topic you pass in from Google Sheets). It builds the outline, expands each section in a controlled loop, then merges everything into formatted content you can paste into WordPress, Notion, Shopify, or any tool with an API.

What You Get: Automation vs. Results

Example: What This Looks Like

Say your Google Sheet has 10 blog topics for the month. Manually, a decent outline plus a rough draft often takes about 2 hours per topic, so you’re staring at roughly 20 hours before edits even begin. With this workflow, you can run one topic, let the outline generate, then let the loop expand each section while you do other work. Call it 5 minutes to submit the topic and settings, then about 15 minutes of processing time. That’s a draft you can polish the same day, not “someday.”

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets to store and manage topic inputs
  • OpenAI to generate the outline and section drafts
  • OpenAI API key (get it from the OpenAI dashboard)

Skill level: Beginner. You’ll connect credentials, adjust a few fields (topic, keyword, language), and run a test execution.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

Topic gets passed in. You trigger the workflow and map a topic (often from a Google Sheet row) along with basics like language, number of outline items, and your primary keyword.

Outline is generated first. OpenAI produces a structured outline, and the workflow parses it into a clean list of subtopics you can reliably iterate through.

Each section is expanded in a loop. n8n processes outline items in batches, sends each subtopic to the drafting agent, and appends the returned paragraph back onto the item so nothing gets lost.

Everything is merged into publishable formats. The workflow aggregates the expanded sections, then builds HTML from JSON and also outputs Markdown, so you can paste into a CMS or push it to an API later.

You can easily modify the prompt and section template to match your brand voice or editorial format based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Manual Trigger

This workflow is started manually, so you can supply topic inputs before generating the outline and article sections.

  1. Add the Manual Launch Trigger node as the entry point.
  2. Connect Manual Launch Trigger to Topic Input Mapper.
  3. Optionally keep Flowpast Branding as a reference note for documentation and branding.
If you remove Flowpast Branding, it won’t affect execution—it's only a sticky note.

Step 2: Set Up Topic Inputs

Map the topic details that the AI will use to generate the outline and subsections.

  1. Open Topic Input Mapper.
  2. Set Topic to Input your topic Here.
  3. Set How many outline? to 3.
  4. Set Language to Input the language here (ex: English/Indonesia/Arabic/etc).
  5. Set Keyword to Put your keyword here.

Step 3: Configure the Outline Generation AI

This stage uses AI to generate a structured outline and validates the JSON output format.

  1. Open AI Chat Engine and select your model (configured as gpt-4o-mini).
  2. Credential Required: Connect your openAiApi credentials in AI Chat Engine.
  3. Open Outline Builder and set Text to =Write a creative outline max {{ $json["How many outline?"] }} item on {{ $json.Topic }} in {{ $json.Language }} language. Output a JSON object with the following structure: { "topic": "string", "subtopics": [ { "subtopic": "string", "details": "string" } ] } Start the subtopic with an Introduction and end with a Conclusion..
  4. Ensure Outline Builder has Has Output Parser enabled and is connected to Structured Result Parser.
  5. In Structured Result Parser, set JSON Schema Example to { "topic": "string", "subtopics": [ { "subtopic": "string", "details": "string" } ] }.
⚠️ Common Pitfall: The Structured Result Parser is an AI tool node—connect credentials to the parent node AI Chat Engine, not the parser itself.

Step 4: Extract Subtopics and Generate Section Drafts

Convert the outline into subtopic items, loop through them in batches, and draft a section for each one.

  1. In Extract Subtopic List, set JavaScript Code to // Loop over input items and add a new field called 'myNewField' to the JSON of each one return $input.first().json.output.subtopics.
  2. Connect Outline BuilderExtract Subtopic ListIterate Items Batch.
  3. Connect Iterate Items Batch to Content Draft Agent for drafting each subtopic section.
  4. In Content Draft Agent, set Text to =The outline refers to parts of a conversation. This is the article section that covers these topics: Subtopic: {{ $json.subtopic }} Details: {{ $json.details }} Write a maximum of 1 paragraph. Do not number any sections. Include a lot of detail. Mandatory Rules 1. Do not add numbering in any part. 2. Write with detail and dense information. 3. Ensure more than 75 percent of sentences contain a maximum of 20 words to meet YOAST SEO readability standards. 4. Ensure the keyword "{{ $('Topic Input Mapper').item.json.Keyword }}" appears in the sentences. 5. Use clear and active sentences. 6. Use 1 or 2 transition words recognized by YOAST. Examples: so, therefore, however, besides that, then, after that, for example. 7. Avoid emojis, excessive punctuation, and promotional style. 8. Do not use em dashes to keep the writing natural and not AI generated. 9. Write in {{ $('Topic Input Mapper').item.json.Language }} Language.
  5. Open Secondary Chat Engine (model gpt-4o-mini) and ensure it is connected as the language model for Content Draft Agent.
  6. Credential Required: Connect your openAiApi credentials in Secondary Chat Engine.
  7. In Window Memory Buffer, set Session Key to ={{ $('Iterate Items Batch').item.json.details }} and Session ID Type to customKey (credentials are handled by the parent Content Draft Agent).
  8. After drafting, connect Content Draft AgentAppend Subtopic FieldIterate Items Batch to loop through the next subtopic.
⚠️ Common Pitfall: Make sure Iterate Items Batch loops back from Append Subtopic Field; otherwise, only the first subtopic will be processed.

Step 5: Aggregate Drafts and Build Final HTML

Combine all drafted sections into a single output and format it for publishing.

  1. Connect Iterate Items BatchCombine All Items to aggregate all item data.
  2. In Combine All Items, set Aggregate to aggregateAllItemData.
  3. Connect Combine All ItemsBuild HTML from JSON.
  4. In Build HTML from JSON, keep the provided JavaScript Code that reads $('Outline Builder').first().json.output.topic and compiles content_markdown and content_html.

Step 6: Test and Activate Your Workflow

Validate each stage and confirm the output structure before using it in production.

  1. Click Execute Workflow to run Manual Launch Trigger manually.
  2. Verify Outline Builder returns a JSON object matching the schema in Structured Result Parser.
  3. Check Combine All Items for a single aggregated array and confirm Build HTML from JSON outputs title, content_markdown, and content_html.
  4. When results look correct, toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • OpenAI credentials can expire or be pasted incorrectly. If things break, check the OpenAI credential in n8n’s credential manager first, then confirm the key is active in your OpenAI dashboard.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this OpenAI Sheets drafts automation?

About 30 minutes if your OpenAI key and Google access are ready.

Do I need coding skills to automate OpenAI Sheets drafts?

No. You’ll mostly paste an API key and tweak a few fields like topic, tone, and keyword.

Is n8n free to use for this OpenAI Sheets drafts workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs (for GPT-4o Mini, many teams land around a few cents per draft, depending on length).

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this OpenAI Sheets drafts workflow for a different brand voice and section format?

Yes, and you should. Update the prompts in the Outline Builder and Content Draft Agent to match your voice, then adjust the “Build HTML from JSON” step to match your preferred heading structure. Common customizations include adding a “Key takeaways” section, forcing shorter paragraphs for skimmability, and inserting internal-link placeholders for your site.

Why is my OpenAI connection failing in this workflow?

Usually it’s an expired or incorrect API key. Regenerate the key in your OpenAI dashboard, then reselect or update the OpenAI credential inside n8n. If it still fails, check model access on your OpenAI account and watch for rate limits when you loop through many outline sections at once.

How many drafts can this OpenAI Sheets drafts automation handle?

A lot. On n8n Cloud, it depends on your monthly execution allowance, because each section expansion can count as additional work. If you self-host, there’s no execution limit from n8n itself, but your server resources and OpenAI rate limits become the real ceiling. In practical terms, most small teams run dozens of drafts a week comfortably, then scale up once prompts and editorial checks are dialed in.

Is this OpenAI Sheets drafts automation better than using Zapier or Make?

Often, yes. n8n is simply more comfortable for multi-step AI flows like “outline first, then loop through sections,” and you don’t get boxed in by premium pricing when you need branching, merging, or custom code for formatting. Zapier and Make can work, but long drafts plus looping can get expensive and harder to debug. If you only need a simple “topic in, text out” step, those tools may be quicker to start with. For anything you’ll run every week, the control here is worth it. Talk to an automation expert if you want help choosing.

Set this up once and your topic list stops feeling intimidating. The workflow handles the repetitive drafting work so you can focus on insight, examples, and publishing cadence.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal