Google Sheets + SerpAPI: blog drafts ready to edit
Your content plan looks fine on paper. Then research starts. Tabs everywhere, half-finished outlines, “People Also Ask” questions copied into random docs, and the original topic list in Google Sheets quietly goes stale.
This is the kind of mess that hits marketing managers first, but agency owners and solo consultants feel it too. With SerpAPI blog automation, you turn a simple topic list into ready-to-edit drafts, without redoing the same research loop for every post.
This workflow pulls real search questions, merges the insights, and has GPT-4 draft the post. You review, tweak, and publish on your schedule.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Google Sheets + SerpAPI: blog drafts ready to edit
flowchart LR
subgraph sg0["Google Sheets Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge"]
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n2@{ icon: "mdi:play-circle", form: "rounded", label: "Google Sheets Trigger", pos: "b", h: 48 }
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>All of the Information"]
n4@{ icon: "mdi:database", form: "rounded", label: "Read Rows", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Only Reads Empty Status"]
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Broad Words"]
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>PAA (SerpAPI)"]
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Autocomplete"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Format PAA (SerpAPI)"]
n10@{ icon: "mdi:robot", form: "rounded", label: "Generate Blog Post", pos: "b", h: 48 }
n11@{ icon: "mdi:brain", form: "rounded", label: "GPT-4", pos: "b", h: 48 }
n12@{ icon: "mdi:swap-vertical", form: "rounded", label: "Update 'Done' Status", pos: "b", h: 48 }
n13@{ icon: "mdi:database", form: "rounded", label: "Export", pos: "b", h: 48 }
n14@{ icon: "mdi:cog", form: "rounded", label: "Use Wait Node for Large Batc..", pos: "b", h: 48 }
n11 -.-> n10
n0 --> n3
n13 --> n1
n4 --> n5
n6 --> n8
n8 --> n0
n7 --> n9
n1 --> n10
n10 --> n12
n9 --> n0
n12 --> n13
n2 --> n4
n3 --> n1
n5 --> n14
n14 --> n6
n14 --> n7
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n2 trigger
class n10 ai
class n11 aiModel
class n4,n13 database
class n7,n8 api
class n3,n5,n6,n9 code
classDef customIcon fill:none,stroke:none
class n0,n3,n5,n6,n7,n8,n9 customIcon
The Problem: SEO research turns into a time sink
Writing the draft is rarely the slow part. It’s the “prep” that quietly eats your calendar: finding related phrases, figuring out what people actually ask, and trying to build a structure that won’t fall apart in editing. Do that once and it’s manageable. Do it for ten topics and it becomes a weekly tax. And because research is scattered across browser tabs, notes, and half-updated spreadsheets, you end up repeating the same work the next time you pick up that topic.
The friction compounds. Here’s where it breaks down.
- You spend about 45 minutes per post just collecting “People Also Ask” questions and autocomplete phrases, then cleaning them up so they’re usable.
- Topic lists in Google Sheets don’t stay accurate when drafts live somewhere else, so “what’s done” becomes a guessing game.
- Writers work from inconsistent inputs, which means more rewrites and weaker on-page structure.
- Manual copy-paste invites small mistakes, like wrong query phrasing or missing key questions, and those mistakes show up later as thin content.
The Solution: Google Sheets topics in, drafts back out
This workflow starts with what you already have: a Google Sheet full of blog inspirations. It checks each row and only processes the ones that aren’t marked “done,” so you don’t keep regenerating the same posts by accident. For each topic, it pulls real search insights from two places: Google Autocomplete plus “People Also Ask” data (through SerpAPI and a companion SEO API endpoint). Those insights get normalized and merged into a clean bundle of phrases and questions. Then GPT-4 uses that bundle as context to draft a full blog post you can actually edit. Finally, the draft is written back into the same Google Sheet, right next to the original topic.
The workflow begins when your Google Sheet changes (or you run it manually). Next it gathers autocomplete suggestions and PAA questions, combines them, and feeds the final context into the AI writing step. Once the draft is generated, it updates the row so your sheet becomes the source of truth again.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you write 8 posts a month. Manually, you might spend about 45 minutes gathering autocomplete phrases and PAA questions, then another 45 minutes turning that into a usable outline and rough draft, so call it about 12 hours monthly before editing even begins. With this workflow, you drop 8 topics into Google Sheets, run it once, and let it generate drafts while you do something else. Even if you spend 10 minutes per post reviewing and adjusting the prompt outputs, that’s still roughly a full workday back every month.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store topics, status, and drafts.
- SerpAPI to fetch People Also Ask questions.
- OpenAI API key (get it from your OpenAI dashboard).
Skill level: Intermediate. You’ll connect accounts, paste API keys, and tweak a prompt, but you won’t be writing an app.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A spreadsheet update (or a manual run) kicks things off. The Google Sheets trigger detects new or changed rows, then the workflow fetches the full set of rows so it can decide what needs work.
Rows get filtered so you only process what’s pending. A small logic step checks the “Status” column and routes only the not-done topics into the batch handler. Less duplication. Fewer accidental overwrites.
Search intent signals get collected and cleaned. One HTTP request calls SerpAPI for PAA questions, while another calls the autocomplete/PAA endpoint (the workflow uses a hosted API). The results are normalized and merged so your AI prompt receives tidy, predictable fields instead of messy raw JSON.
GPT-4 drafts the post and your sheet gets updated. The AI agent generates the blog draft, the workflow sets the output fields, and the Google Sheets update writes the draft back into the “Blog Draft” column for that exact row.
You can easily modify the “Status” logic to process everything, or switch the trigger to a schedule for weekly production runs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Spreadsheet Row Trigger
Set the workflow to start when a new row is added to your Google Sheet.
- Add and open Spreadsheet Row Trigger.
- Set Event to
rowAdded. - Select your Document and Sheet in the list fields.
- Credential Required: Connect your googleSheetsTriggerOAuth2Api credentials.
Step 2: Connect Google Sheets and pull pending entries
Fetch all rows and filter only those without a status so the workflow processes new ideas.
- Open Fetch Sheet Rows and select the same Document and Sheet.
- Credential Required: Connect your googleSheetsOAuth2Api credentials in Fetch Sheet Rows.
- Open Filter Pending Entries and confirm the code keeps rows with empty Status.
- Verify the flow Spreadsheet Row Trigger → Fetch Sheet Rows → Filter Pending Entries.
Step 3: Set up topic enrichment and parallel API calls
Derive short topics and pull related autocomplete and “People Also Ask” data from two sources in parallel.
- Open Batch Delay Gate (wait node) to control batch pacing if needed.
- Confirm Batch Delay Gate outputs to both Derive Topic Phrases and PAA Search Request in parallel.
- In Derive Topic Phrases, keep the code that creates
topicfrom the last three words of Blog Inspiration. - In Autocomplete API Request, set URL to
https://seo-api2.onrender.com/get-seo-data, Method toPOST, and body parameter topic to{{ $json.topic }}. - In PAA Search Request, set URL to
https://serpapi.com/searchand query parameter q to{{ $('Filter Pending Entries').item.json['Blog Inspiration'] }}. - Add your SerpAPI key in PAA Search Request query parameter api_key (currently empty).
- Keep the flow PAA Search Request → Normalize PAA Results → Combine Data Streams and Autocomplete API Request → Combine Data Streams.
Step 4: Assemble context and generate the blog draft
Merge autocomplete and PAA results, then generate a blog draft with the AI agent.
- In Combine Data Streams, keep both inputs connected from Autocomplete API Request and Normalize PAA Results.
- Open Assemble Context Data and keep the code that normalizes topics and merges autocomplete + PAA arrays.
- Confirm Assemble Context Data outputs to Iterate Through Entries to process each row.
- Open Compose Blog Draft and keep the prompt text starting with
Write a blog post based on the following topic:including variables{{ $json.topic }},{{ $json.autocomplete }}, and{{ $json.paa }}. - Ensure OpenAI Chat Model is connected as the language model for Compose Blog Draft.
- Credential Required: Connect your openAiApi credentials in OpenAI Chat Model.
- In OpenAI Chat Model, confirm the Model is set to
gpt-4o.
Step 5: Configure output mapping and update the spreadsheet
Write the generated draft back to the sheet and mark the row as complete.
- Open Set Output Fields and confirm these assignments:
- Set Blog Draft to
{{ $json.output }}. - Set Blog Inspiration to
{{ $('Iterate Through Entries').item.json.topic }}. - Set Status to
done. - Open Update Spreadsheet Row and set Operation to
update. - Select the same Document and Sheet used earlier.
- Credential Required: Connect your googleSheetsOAuth2Api credentials in Update Spreadsheet Row.
Step 6: Test and Activate Your Workflow
Validate the end-to-end flow from new row to completed blog draft.
- Add a new row with Blog Inspiration filled and an empty Status.
- Manually execute the workflow from Spreadsheet Row Trigger to test the full path.
- Confirm the draft appears in the Blog Draft column and Status becomes
done. - Check that Compose Blog Draft generated a 500-word narrative with the specified tone and CTA.
- Turn on the workflow by switching Active to enabled for production use.
Common Gotchas
- Google Sheets credentials can expire or lose access if the spreadsheet is moved. If updates stop writing back, check the Google connection in n8n and confirm the file permissions in Google Drive.
- 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
About 30 minutes if you already have your accounts and API keys.
No. You will connect Google Sheets, paste API keys, and adjust a prompt.
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 SerpAPI and OpenAI usage (often just a few dollars while you’re drafting a handful of posts).
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.
Yes, and you should. Update the prompt inside the “Compose Blog Draft” AI step so it matches your brand voice, your target customer, and your formatting preferences (like H2/H3 structure, CTA style, or reading level). You can also adjust the “Filter Pending Entries” logic to re-run older rows when you want to refresh content, and tweak the “Set Output Fields” step if you want extra columns like title variants, meta descriptions, or FAQ suggestions.
Usually it’s an expired Google authorization or the spreadsheet permissions changed. Reconnect Google Sheets in n8n, then confirm the exact file and worksheet still exist and are shared with the connected Google account. If it fails on update, double-check the row identifiers being passed into the “Update Spreadsheet Row” step, because wrong IDs can look like “missing row” errors.
Dozens per run for most small teams, and more if you tune batching and limits.
Often, yes, if you care about control. This workflow benefits from batching, merging data streams, and more flexible logic without paying extra per branch. n8n also gives you a realistic self-host path if you start generating lots of drafts. Zapier or Make can be quicker for very simple “one input, one output” flows, but they get clunky when you’re cleaning and combining research data. If you’re on the fence, Talk to an automation expert and you’ll get a straight answer for your setup.
Once your research and first draft are automated, publishing stops feeling like a scramble. Set it up, keep your sheet organized, and spend your time on the parts that actually need a human editor.
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.