Google Drive + Ollama, SEO drafts ready to edit
Keyword research is supposed to lead to publishing. Instead, it turns into five tabs, three half-copied outlines, and a draft that still feels “thin.” You lose the thread. Then you lose the afternoon.
This Ollama SEO drafts setup hits SEO specialists first, but content marketers and small teams running their own blog feel it too. You will go from a single keyword to a structured draft that’s already shaped like a real article, not a blank page.
This workflow pulls the top results, extracts the useful parts, and generates a polished post that lands in Google Drive ready for edits. You’ll see what it automates, what you need, and how to adapt it to your niche.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Google Drive + Ollama, SEO drafts ready to edit
flowchart LR
subgraph sg0["When chat message received Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When chat message received", pos: "b", h: 48 }
n1["<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/>Code"]
n2@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", 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/httprequest.dark.svg' width='40' height='40' /></div><br/>Get content from URL"]
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items1", 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/>Create Body Text Code"]
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/>Clean body text"]
n7@{ icon: "mdi:cog", form: "rounded", label: "Google Drive", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Data extractor and summarizer1", pos: "b", h: 48 }
n9@{ icon: "mdi:robot", form: "rounded", label: "Seo Content1", pos: "b", h: 48 }
n10@{ icon: "mdi:robot", form: "rounded", label: "Refine Content1", pos: "b", h: 48 }
n11@{ icon: "mdi:brain", form: "rounded", label: "Ollama Chat Model", pos: "b", h: 48 }
n12["<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/>Google Search (rapid api)"]
n1 --> n2
n9 --> n10
n6 --> n4
n2 --> n4
n2 --> n3
n10 --> n7
n4 --> n5
n4 --> n6
n11 -.-> n8
n11 -.-> n9
n11 -.-> n10
n3 --> n2
n5 --> n8
n12 --> n1
n0 --> n12
n8 --> n9
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 n0 trigger
class n8,n9,n10 ai
class n11 aiModel
class n3,n12 api
class n1,n5,n6 code
classDef customIcon fill:none,stroke:none
class n1,n3,n5,n6,n12 customIcon
Why This Matters: Turning a Keyword Into a Real Draft
Writing “SEO content” manually usually means doing four jobs at once. You search the keyword, skim competitor posts, copy chunks into a doc, try to outline, then bounce back to SERPs because you missed something important. It’s not just slow. It’s mentally noisy. And when you finally start writing, you’re already tired, which is how you end up with a generic intro and a weak structure that needs a full rewrite later. Honestly, the worst part is the context switching. It makes good writing feel harder than it should.
The friction compounds. Here’s where it breaks down in real life.
- Research turns into endless skimming, because there’s no consistent way to capture the “best parts” of the top results.
- Copy-paste drafts pull in menus, cookie banners, and unrelated sections that you later delete line by line.
- Outlines drift from search intent, so the final post ranks poorly even if the writing is decent.
- Teams stop publishing consistently because each article quietly costs half a day of focused effort.
What You’ll Build: Keyword to Google Drive Draft in One Flow
This workflow starts with a simple chat message containing your target keyword. n8n sends that keyword to a Google Search API (via RapidAPI), collects the top results, then visits each page to pull the core content. After that, it cleans the text to remove clutter and prepares it for analysis. Next, Ollama (running locally with the mistral:7b model) summarizes the sources, extracts the key ideas, and turns them into a structured, SEO-friendly draft. Finally, the finished article is saved into a specific Google Drive folder as a .docx file, so you can open it, edit fast, and publish when it’s ready.
The workflow begins with search and scraping. Then it shifts into three AI passes: summarize what matters, draft for SEO structure, and polish for readability. The output lands in Google Drive, which means your “drafts” folder becomes the handoff point for you or your team.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you write 3 SEO posts a week. Manually, you might spend about 20 minutes finding sources, another hour skimming three top articles, then about 30 minutes outlining and cleaning copied notes. That’s roughly 2 hours before you even “start writing.” With this workflow, you send the keyword (a minute), let it fetch and scrape the top 3 results, and wait for the AI draft and polish cycle (often around 20–30 minutes depending on the pages). You get back about 4 to 6 hours per week, while still reviewing the draft like an editor instead of a typist.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Ollama to run the local Mistral model
- Google Drive to save finished .docx drafts
- RapidAPI key (get it from your RapidAPI dashboard)
Skill level: Intermediate. You’ll mostly connect accounts and paste API credentials, plus make small edits like setting a Google Drive folder ID.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A chat message triggers everything. You send a keyword into the workflow’s chat trigger, which acts like a simple “content request” intake.
Search results are collected and prepped. n8n calls the Google Search API through RapidAPI, then a transform step shapes the response into a clean list of URLs and titles it can work through.
Each article gets scraped and cleaned. The workflow loops through the top results, fetches the page HTML, extracts the main body, and sanitizes it. This is the difference between “AI wrote fluff” and “AI had solid inputs.”
Ollama generates the draft and polishes it. A summarization agent pulls out key points, an SEO drafting agent turns that into a structured article, then a final agent polishes tone and readability using the Ollama chat engine (mistral:7b).
The finished file lands in Google Drive. n8n uploads the output as a .docx into your chosen folder, so editing and approvals happen where your team already works.
You can easily modify the number of search results to scrape or the prompt style to match your brand voice based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Chat Trigger
Set up the workflow entry point so chat input can kick off the search and scraping flow.
- Add and open Incoming Chat Trigger.
- Keep the default settings (no additional parameters are required).
- Connect Incoming Chat Trigger to Rapid Search Request to start the request pipeline.
Step 2: Configure the Search and Transformation Layer
This stage sends the chat input to a search endpoint and prepares the results for batching.
- Open Rapid Search Request and configure the HTTP request details for your search provider (URL, method, headers, and query parameters).
- Connect Rapid Search Request to Transform Logic to normalize or reshape the response payload.
- In Transform Logic, implement code to extract the list of URLs or records you want to scrape.
- Connect Transform Logic to Iterate Records to begin batching for processing.
Step 3: Build the Scraping and Cleaning Pipeline
These nodes fetch each URL, clean the content, and build structured body text for the AI agents.
- Open Fetch URL Content and configure the HTTP request to retrieve page HTML for each URL from Iterate Records.
- Ensure the execution flow connects Fetch URL Content to Iterate Records.
- Connect Iterate Records to Iterate Records B and confirm Iterate Records outputs to both Iterate Records B and Fetch URL Content in parallel.
- Connect Iterate Records B to both Build Body Text Script and Sanitize Body Text so content is cleaned before building the final text.
- In Sanitize Body Text, implement code to remove HTML tags, ads, or boilerplate content.
- In Build Body Text Script, implement code to assemble the clean text into a single field for AI processing.
Step 4: Set Up the AI Content Pipeline
This stage summarizes source content, drafts an SEO article, and polishes it for output.
- Open Ollama Chat Engine and configure your local Ollama model settings.
- Verify that Ollama Chat Engine is connected as the language model for Extract & Summarize Agent, SEO Draft Agent, and Polish Content Agent.
- Connect Build Body Text Script to Extract & Summarize Agent to generate a concise summary of the scraped content.
- Ensure the execution flow continues from Extract & Summarize Agent to SEO Draft Agent, then to Polish Content Agent.
Step 5: Configure the Output Destination
Send the polished article to Google Drive for storage and further review.
- Open Upload to Drive and configure the file name, folder, and content fields based on the polished output.
- Credential Required: Connect your Google Drive credentials.
- Ensure Polish Content Agent connects to Upload to Drive so the final content is saved automatically.
Step 6: Test and Activate Your Workflow
Run a full test to confirm each stage works before turning on the automation.
- Use the Incoming Chat Trigger test panel to submit a sample keyword prompt.
- Verify that Rapid Search Request returns URLs, and Fetch URL Content retrieves page data.
- Confirm Extract & Summarize Agent, SEO Draft Agent, and Polish Content Agent produce content in sequence.
- Check Google Drive for a newly created file from Upload to Drive.
- When successful, toggle the workflow to Active for production use.
Troubleshooting Tips
- RapidAPI credentials can fail due to a bad header or an unsubscribed plan. Check your n8n HTTP Header Auth credential and confirm the API is active in your RapidAPI 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.
- Ollama connections usually fail because the base URL is wrong for your setup. Local n8n uses http://localhost:11434, but Docker often needs http://host.docker.internal:11434.
- Google Drive uploads can error if OAuth permissions are too limited or the folder ID is wrong. Re-check the Drive credential scopes and confirm the folderId points to a folder you can write to.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Quick Answers
About 30 minutes if your accounts and Ollama are already set up.
No. You’ll connect credentials and adjust a few fields like the Google Drive folder ID. The code nodes are already built into the template.
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 RapidAPI usage fees for Google Search calls.
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. Change the “limit: 3” setting in the search step if you want more sources, and tweak the “Sanitize Body Text” logic to target different page layouts like <article> or specific divs. If you prefer another model, swap mistral:7b for llama3 or mixtral in the Ollama chat engine node. You can also replace the Google Drive upload with Notion, Slack, or WordPress once the draft meets your format.
Most of the time it’s an OAuth scope or folder permission issue. Reconnect your Google Drive credential in n8n with read/write access, then confirm the folderId points to a folder you can edit. If it still fails, check if your Google account has restrictions (common on managed workspaces) and try a personal Drive for testing.
It’s fine for a few dozen drafts a week on a typical setup.
For this workflow, n8n has a few advantages: it’s easier to run multi-step scraping and cleanup, you can self-host for unlimited executions, and you can point directly at a local Ollama model without paying per task. Zapier or Make can still work, but complex loops (top results → fetch pages → clean text → multi-pass AI) get expensive and fiddly. Another practical point is control: with n8n, you can see and edit each transformation stage, which is crucial for content quality. If you only want “keyword in, draft out” with minimal knobs, those tools may feel simpler at first. Talk to an automation expert if you’re unsure which route fits your publishing pace.
Once this is running, your “first draft” stops being a project. It becomes a repeatable output you can review, tweak, and ship.
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.