Skip to main content
← Back to Projects
AI Automation In use Flagship n8n workflow

n8n Content Machine

One topic in a Google Sheet, twelve platform drafts in Google Docs

An n8n workflow that turns one topic from a Google Sheet into 12 platform-specific drafts in Google Docs with a single Gemini call. Drafts only.

Solo build; I use it for my own content

n8nGoogle GeminiGoogle SheetsGoogle DocsContent Ops
16+ hours
Hours saved · per week
owner-reported
10x faster (6 hours → 30 minutes)
Time per topic · per topic
owner-reported
01 / Problem

The problem

Every topic I want to talk about ends up needing the same work seven times over. A YouTube script with chapters, a Short, an Instagram reel shot list, a carousel, a LinkedIn post and article, posts for X, Threads and Facebook, and a blog draft. The ideas are the same; the formats, lengths and languages are not. My reels and Instagram captions are in Hinglish, my LinkedIn and blog posts are in plain professional English, and a carousel slide has to fit on a phone screen.

Doing that by hand meant starting from a blank page for each format and keeping all of it consistent with the original idea. A chat window helps with one format at a time, but I still had to ask twelve times, copy twelve answers and file them somewhere I could find them again. I wanted to type a topic once and come back to a folder of drafts I only needed to review.

02 / Solution

What I built

An n8n workflow that reads topics from a Google Sheet. For each row marked READY, it sends the topic to Google Gemini with one long prompt that asks for a single JSON object covering 12 formats. Two Code nodes turn that JSON into documents: one master Google Doc with every section, and one Google Doc per format, all moved into one Drive folder. The workflow also writes the 12 outputs into the sheet row and sets it to DONE.

The one-sentence version: one topic in, 13 draft docs out, with one model call.

What I do now: add a topic to the sheet, run the workflow, and review drafts instead of writing them from scratch. Posting is still manual on purpose. Nothing in the workflow publishes or schedules anything.

03 / Demo

See it running

04 / Architecture

How it fits together

n8n Content Machine

One topic row in, 13 draft docs out

  1. Google SheetTopic queue: rows marked READYTitle column12 output columnsStatus → DONE
    READY topic
  2. n8n workflowRuns on my n8n instance, started by handmanual triggerCode: parse + flattenCode: 12 doc jobs
    one prompt
  3. GeminiGoogle's API: one call per topicstrict JSON contract12 formats, 7 channels
    JSON back; n8n writes the docs
  4. Docs + DriveGoogle Docs API and one Drive folder1 master doc12 format docs
Everything it writes is a draft: nothing is posted or scheduled to any platform.
05 / Write-up

Architecture

The flow is linear: 11 n8n nodes, started by a manual trigger.

  1. Google Sheet: the queue. The workflow reads rows where Status is READY; the only input is the Title column.
  2. Gemini: one call per topic. The prompt embeds the topic, a brand block and strict output rules, and asks for one JSON object.
  3. Parse and flatten (Code node): strips any code fences, extracts the JSON, builds the master doc body and the 12 sheet cells.
  4. Docs and Drive: HTTP Request nodes call the Google Docs API to create each doc and insert its text. Drive nodes move the docs into one folder.
  5. Sheet update: the 12 output columns are written and the row is set to DONE.

The main trade-off is one model call instead of twelve. A single JSON contract keeps every format consistent with the same idea, and it makes the rest of the workflow plain JavaScript that I can read and debug. The cost is that one bad response affects all twelve drafts, and there is no retry or error branch in the export. Gemini sits in exactly one place; everything after it is deterministic. The human approval step is me, reading the drafts in Docs before anything goes out.

Stack

  • n8n: the workflow engine. The project ships as an exported workflow you import, not as code you deploy.
  • Google Gemini (Gemini 3 Pro preview, through n8n's Gemini node): generates the whole content pack in one call.
  • Google Sheets: a topic queue with READY and DONE as the only states.
  • Google Docs API (through HTTP Request nodes): creates each doc and inserts its text with batchUpdate.
  • Google Drive: keeps all 13 docs for a topic in one folder.
  • JavaScript in n8n Code nodes: parsing, flattening and splitting the pack into doc jobs.

Key features

  • A sheet as the control panel. Mark a row READY, run the workflow, and the row comes back DONE with all 12 drafts in its columns.
  • 12 formats across 7 channels. YouTube long and Short, Instagram reel, post and carousel, Facebook, Threads, an X post and thread, a LinkedIn post and article, and a blog post.
  • Format rules in the prompt. Exactly 10 carousel slides of at most 180 characters, a 35–45 second reel with 8–12 shots, a 6–9 minute YouTube script with chapters, tags and thumbnail ideas.
  • Language per channel. Hinglish for the reel voiceover and Instagram captions, simple English for carousel slides, professional English for LinkedIn and the blog.
  • 13 docs per topic. A master doc with everything, plus one doc per format, filed in one Drive folder.
  • Drafts only. Image and thumbnail outputs are text prompts and concepts. No platform is posted to.

Code or config highlight

The output rules at the top of the system prompt, from the README at commit 69d1cdb:

IMPORTANT OUTPUT RULES (MUST FOLLOW):
1) Output ONLY valid JSON. No markdown. No commentary. No trailing commas.
2) Use double quotes for all strings. Use only: string/number/boolean/array/object.
3) Language:
   - Hinglish for Reel voiceover + IG captions (natural, not cringe).
   - Simple English for Carousel slides (clean, punchy).
   - LinkedIn + Blog can be professional English (calm, engineering-led).
4) Avoid false claims. If something is uncertain, phrase it as a suggestion.
5) Carousel: exactly 10 slides. Each slide body must fit on screen (max 180 characters).

Full prompt: README.md, lines 50–62.

These five rules carry most of the design. Rules 1 and 2 are what let a Code node parse the response without a fragile cleanup step. Rule 3 encodes how I actually write for each channel. Rule 4 is there because drafts with invented facts cost more review time than they save.

Results

These numbers are owner-reported. The repository has no timing data, so they come from my own use, not from a measurement in the code.

  • 16+ hours saved per week (owner-reported).
  • 10x faster per topic: about 6 hours by hand down to 30 minutes (owner-reported).

In words: a topic used to cost me about six hours across all formats. Now the first drafts appear in one run, and my time goes into reviewing and posting.

Lessons

One call needs a strict contract. The first thing that breaks with a long JSON response is parsing. The prompt asks for JSON only, and the parse step still strips code fences and extracts the outer object, because models don't always listen.

Field names drift. Some per-format docs read field names the prompt never asks for, so parts of the YouTube Short, LinkedIn Article and blog SEO docs come out empty. The master doc and the sheet cells use the right fields. Next time I would generate the doc templates and the prompt schema from one definition.

Know what a run does. The parse step reads the first item only, so each run handles one topic even if several rows are READY. There is no batching or error branch yet; those are what's next. The prompt also hard-codes my brand block, which anyone importing it should replace.

Links

The workflow export, the full system prompt and the setup notes are in the GitHub repository. The demo video walks through the workflow from the sheet to the finished docs. For the thinking behind the formats, read how I turn one post into ten assets. If you're new to n8n, start with my n8n automation guide.

Work with me

Need something like this built?

I build AI automations, agents and Salesforce solutions for teams. Tell me what you want to automate and I’ll tell you honestly whether it’s a fit.

Share
Discussion

Comments

Loading comments...

Add a comment

Comments are reviewed before they appear.