Google Sheets + Gemini: meta tags drafted for you
Meta tags are one of those SEO tasks that looks small, then quietly eats your week. You copy titles into a sheet, check lengths, peek at competitors, rewrite, then still end up second-guessing everything.
SEO managers feel it when dozens of pages need updates. Content leads run into it during launches. And an agency operator doing audits? Same mess, just with more tabs. This meta tags automation turns a “pile of URLs” into drafted, length-constrained meta titles and descriptions you can review in one place.
You’ll see exactly what the workflow does, what you need to run it, and where the real time savings show up once it’s part of your process.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Google Sheets + Gemini: meta tags drafted for you
flowchart LR
subgraph sg0["Google Sheets Flow"]
direction LR
n0@{ icon: "mdi:database", form: "rounded", label: "Get row(s) in sheet1", pos: "b", h: 48 }
n1@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n2["<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/>Googl SERP"]
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/>Code1"]
n4@{ icon: "mdi:database", form: "rounded", label: "Update row in sheet", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n6@{ icon: "mdi:database", form: "rounded", label: "Update row in sheet1", pos: "b", h: 48 }
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/html.dark.svg' width='40' height='40' /></div><br/>HTML"]
n8@{ icon: "mdi:play-circle", form: "rounded", label: "Google Sheets Trigger", pos: "b", h: 48 }
n9@{ icon: "mdi:swap-vertical", form: "rounded", label: "Edit Fields", pos: "b", h: 48 }
n10@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model", pos: "b", h: 48 }
n11@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model1", pos: "b", h: 48 }
n12@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model2", pos: "b", h: 48 }
n13["<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"]
n14["<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/>Code2"]
n15@{ icon: "mdi:robot", form: "rounded", label: "AI Analyzer", pos: "b", h: 48 }
n16["<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/>Scrape Website"]
n17@{ icon: "mdi:robot", form: "rounded", label: "Competitor Analysis", pos: "b", h: 48 }
n18@{ icon: "mdi:robot", form: "rounded", label: "Master Generator", pos: "b", h: 48 }
n13 --> n18
n7 --> n9
n3 --> n17
n14 --> n4
n2 --> n3
n15 --> n2
n9 --> n15
n16 --> n7
n5 --> n6
n18 --> n14
n17 --> n13
n4 --> n5
n0 --> n5
n6 --> n16
n8 --> n0
n10 -.-> n15
n1 -.-> n15
n11 -.-> n17
n12 -.-> n18
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 n8 trigger
class n1,n15,n17,n18 ai
class n10,n11,n12 aiModel
class n0,n4,n6 database
class n2,n16 api
class n3,n13,n14 code
classDef customIcon fill:none,stroke:none
class n2,n3,n7,n13,n14,n16 customIcon
The Challenge: Meta tags that take forever (and still feel risky)
Writing meta titles and descriptions sounds simple until you’re doing it for 30, 100, or 500 pages. You can’t just “be creative” either, because you’re boxed in by pixel/character limits, the page’s real intent, and whatever patterns are winning in the SERP right now. So you end up bouncing between your site, a spreadsheet, Google results, and whatever doc your team uses for reviews. One missed detail and you ship tags that are off-topic, too long, or basically identical to competitors.
It adds up fast. Here’s where it breaks down.
- Competitor checks turn into a manual ritual that can take about 10 minutes per URL.
- Length constraints get handled late, which means you rewrite the same tag twice.
- Different people write in different styles, so your SERP snippets look inconsistent across the site.
- Review cycles drag because there’s no single place to compare “current vs. proposed” copy with context.
The Fix: Draft meta titles/descriptions from Sheets using Gemini + competitor patterns
This workflow starts in Google Sheets, because that’s where most teams already track SEO tasks. When a row is marked “New,” n8n grabs the URL, scrapes the page, and extracts the existing meta title/description (plus on-page content signals) so the AI isn’t guessing. Next, an AI analysis step identifies the likely primary keyword, related semantic keywords, the search intent, and the target audience for the page. Then it runs a live Google search for that primary keyword, filters the results down to real competitors, and analyzes what those top pages are doing in their meta tags. Finally, Gemini synthesizes your page data with competitor patterns and drafts a fresh meta title and meta description that stay within length constraints. The workflow writes everything back to the same row and flips the status to “Generated,” so your team can review and approve quickly.
The workflow kicks off from a Google Sheets row trigger. It moves through three phases: self-analysis of your page, competitor intelligence from live SERPs, then final generation and update back to the sheet. The output is clean and reviewable: current tags, generated tags, and supporting insights in a format you can hand to a stakeholder.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you’re refreshing meta tags for 20 pages in a week. Manually, you might spend about 10 minutes per page pulling competitor examples, plus another 5 minutes drafting and trimming for length, which is roughly 5 hours total. With this workflow, you add 20 URLs to Google Sheets, set Status to “New,” and let it run; your hands-on time becomes review and minor edits, maybe 2 minutes per page. That’s about 4 hours back in a week, without lowering quality.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store URLs, statuses, and outputs
- Google AI / Gemini to analyze pages and draft tags
- SerpApi key (get it from your SerpApi dashboard)
- ScrapingDog API key (get it from your ScrapingDog account)
Skill level: Beginner. You’ll paste API keys, connect Google Sheets, and map a few columns.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A new row appears in Google Sheets. When you add a URL and set Status to “New,” the workflow picks it up and marks it “In Progress” so nothing gets processed twice.
Your page gets scraped and summarized. n8n fetches the page content via an HTTP request, extracts the important HTML fields, and maps your current meta title and description into a structured format the AI can reliably use.
Competitors get pulled into the decision. The workflow uses the page’s likely primary keyword to run a Google search (via SerpApi), filters results to true competitors, then has an AI review the meta patterns that show up across top-ranking pages.
Gemini drafts your new tags and writes them back. A final generation step produces a length-constrained meta title and description, then updates your spreadsheet row to “Generated” with the new copy ready for review.
You can easily modify the “Status” rules to match your pipeline (for example, add “Needs Review” or “Approved”). See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Sheet Row Added Trigger
Set up the trigger that watches your spreadsheet for new rows and starts the automation.
- Add the Sheet Row Added Trigger node and set Event to
rowAdded. - Select the spreadsheet in Document ID and choose the Control Panel sheet in Sheet Name.
- Credential Required: Connect your googleSheetsTriggerOAuth2Api credentials.
Step 2: Connect Google Sheets
Load new rows, iterate them in batches, and mark each row as in-progress before processing.
- In Fetch Sheet Rows, set the filter to Status =
Newand select the same spreadsheet and Control Panel sheet. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Fetch Sheet Rows.
- Configure Batch Iterate Records to process rows in batches (default settings are fine).
- In Mark Row In Progress, set Operation to
updateand map URL to{{ $json.URL }}, and Status toGenerating- wait for a few minutes. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Mark Row In Progress.
Step 3: Set Up Web Scraping and Meta Extraction
Pull the target page content, extract meta data, and prepare fields for analysis.
- In Fetch Webpage Content, set URL to
https://api.scrapingdog.com/scrapeand enable Send Query. - Set query parameters: api_key to
[CONFIGURE_YOUR_API_KEY], url to{{ $json.URL }}, and dynamic totrue. - In Extract HTML Fields, use Operation
extractHtmlContentand extract current_title with CSS selectortitleand description with CSS selectormeta[name="description"]using attributecontent. - In Map Meta Fields, map current_title to
{{ $json.current_title[0] }}and description to{{ $json.description[0] }}.
[CONFIGURE_YOUR_API_KEY] in Fetch Webpage Content with your live ScrapingDog API key, or the workflow will return empty HTML.Step 4: Set Up AI Analysis and SERP Enrichment
Analyze the page with Gemini, query search results, and summarize competitor patterns for meta copy strategy.
- In SEO Insight Analyzer, keep the prompt as provided and ensure it references
{{ $('Fetch Webpage Content').item.json.data }}. - Connect Gemini Chat Model A as the language model for SEO Insight Analyzer and Credential Required: Connect your googlePalmApi credentials in Gemini Chat Model A.
- Structured Result Parser is connected as the output parser for SEO Insight Analyzer—add credentials on Gemini Chat Model A (the parent), not on the parser.
- In Search Engine Query, set URL to
https://serpapi.com/searchand include query params: api_key[CONFIGURE_YOUR_API_KEY], enginegoogle, q{{ $json.output.primary_keyword }}, google_domaingoogle.com, hlen. - In Filter SERP Results, keep the JavaScript logic that parses
$input.first().json.dataand references SEO Insight Analyzer. - In Competitor Pattern Review, keep the prompt and ensure it references
{{ JSON.stringify($node["Filter SERP Results"].json.competitor_data_for_ai) }}. - Connect Gemini Chat Model B as the language model for Competitor Pattern Review and Credential Required: Connect your googlePalmApi credentials in Gemini Chat Model B.
[CONFIGURE_YOUR_API_KEY] in Search Engine Query with your SerpAPI key, or the SERP step will fail and return empty results.Step 5: Generate Meta Copy and Write Results
Generate optimized meta tags, sanitize JSON outputs, and update the spreadsheet.
- In Parse AI JSON, keep the JavaScript that extracts JSON from the AI response.
- In Meta Copy Generator, keep the prompt and ensure it references
{{ $node['SEO Insight Analyzer'].json.output.primary_keyword }},{{ $node['SEO Insight Analyzer'].json.output.content_summary }},{{ $node['SEO Insight Analyzer'].json.output.content_angle }}, and{{ $json.competitor_patterns }}. - Connect Gemini Chat Model C as the language model for Meta Copy Generator and Credential Required: Connect your googlePalmApi credentials in Gemini Chat Model C.
- In Finalize JSON Output, keep the JavaScript that parses
$json.textinto a clean object. - In Write Results to Sheet, set Operation to
updateand map fields: URL to{{ $('Mark Row In Progress').item.json.URL }}, Status toGenerated, Ranking Factor to{{ $('Parse AI JSON').item.json.competitor_patterns }}, Current Meta Title to{{ $('Map Meta Fields').item.json.current_title }}, Generated Meta Title to{{ $json.optimized_title }}, Current Meta Description to{{ $('Map Meta Fields').item.json.description }}, Generated Meta Description to{{ $json.optimized_meta }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Write Results to Sheet.
Step 6: Test and Activate Your Workflow
Run a manual test to validate the end-to-end flow, then activate for production use.
- Click Execute Workflow and add a new row with Status set to
Newin the Control Panel sheet. - Confirm that Mark Row In Progress updates the row to
Generating- wait for a few minutesand that Write Results to Sheet writes the generated meta title and description. - Verify that the final row contains Generated Meta Title, Generated Meta Description, and Ranking Factor values.
- When results are correct, toggle the workflow to Active to enable continuous processing.
Watch Out For
- Google Sheets credentials can expire or need specific permissions. If things break, check the n8n Credentials tab and confirm the connected Google account can edit the target sheet.
- 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.
Common Questions
About 10–15 minutes if your API keys are ready.
Yes. You’ll mainly connect accounts, paste keys, and match your sheet columns to the workflow fields.
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 Gemini usage plus SerpApi and ScrapingDog costs (usually a few dollars as you scale).
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.
You can tailor it by adjusting what gets scraped and what gets written back to Sheets. For example, if your pages don’t have clean HTML meta tags, tweak the “Extract HTML Fields” and “Map Meta Fields” parts to pull headings or on-page copy instead. If you want different competitor logic, update the “Filter SERP Results” code so it excludes marketplaces, forums, or your own properties. Many teams also add an “Approved” column so the workflow generates drafts but never overwrites production copy until a human signs off.
Most of the time it’s a permissions issue: the connected Google account can’t edit the sheet, or the Document ID/sheet name doesn’t match. Also check that the OAuth connection in n8n hasn’t expired. If it fails only on some rows, the columns may be misnamed or missing, so the “Update row” step can’t map fields correctly.
It comfortably handles batches of dozens to hundreds of URLs, and the practical limit is usually your API quotas (scraping + SERP + Gemini). On n8n Cloud Starter you’re working within monthly execution limits, so large sites may want a higher plan or self-hosting. If you self-host, there’s no execution cap from n8n itself; you’ll size the server for how many concurrent runs you want. In day-to-day use, a lot of teams run it as a nightly batch so the sheet is filled with fresh drafts by morning.
Often, yes, because this workflow relies on multi-step AI logic, code-based filtering of SERP results, and structured parsing that is easier to control in n8n. Zapier and Make can do parts of it, but you may hit limits or end up with a fragile chain once you add scraping, competitor filtering, and “write back” logic. n8n also gives you a self-hosting path if you want unlimited executions. If you only need “URL in → tags out” with no competitor layer, simpler tools can be fine. Talk to an automation expert if you want help choosing.
Once this is running, your spreadsheet becomes a meta-tag drafting machine instead of a graveyard of half-finished tasks. You review, approve, move on.
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.