🔓 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

Google Sheets + OpenAI: publish X vs Y pages fast

Lisa Granqvist Partner Workflow Automation Expert

Writing “X vs Y” comparison pages sounds easy until you’re on your fifth one of the week, copying the same sections, fixing formatting, and still second-guessing the recommendations.

This Sheets OpenAI automation hits content leads first, but growth marketers and small SaaS founders feel it too. You will turn a simple spreadsheet row into a consistent, publishable draft in one run.

This guide shows what the workflow generates, where the content lands, and how to adapt it to your niche without turning it into a “prompt engineering” project.

How This Automation Works

Here’s the complete workflow you’ll be setting up:

n8n Workflow Template: Google Sheets + OpenAI: publish X vs Y pages fast

Why This Matters: “X vs Y” Content Is a Grind to Scale

Comparison pages work because they meet buyers at the exact moment they’re trying to decide. The problem is producing them at a steady pace without letting quality slide. Manually, you end up rewriting the same framework (intro, table, use cases, FAQs), while also trying to keep claims accurate and tone consistent. Add one more twist: you’ll often pull details from scattered notes, old docs, or pricing pages, which makes mistakes more likely. The result is slower publishing, more editing cycles, and content that feels inconsistent across the site.

It adds up fast. Here’s where it usually breaks down.

  • Writers spend about 2 hours per page just assembling the structure and repeating “standard” sections.
  • Tables and FAQs drift over time, so your pages stop feeling like a cohesive library.
  • Teams lose momentum because reviews turn into formatting clean-up, not actual editorial feedback.
  • Publishing is the bottleneck, especially when each page needs manual copy-paste into a CMS.

What You’ll Build: A Spreadsheet-to-Comparison-Page Generator

This workflow turns a simple input like “Notion vs Evernote” into a full comparison page draft, with the same sections every time. You can trigger it manually or have it run based on rows in Google Sheets, so content production becomes a queue instead of a scramble. In the middle, it pulls your structured source data (features, pricing, ratings, overview notes) from Sheets, merges it, and uses OpenAI to write each section with dedicated prompts. It then appends each generated section back into Google Sheets for review, assembles the sections into HTML, and can send a publish request to your CMS via HTTP. If you need localization, Google Translate is available in the workflow to create localized versions without rebuilding the process.

The workflow starts with a list of product pairs in Google Sheets. AI writes the intro, the feature-by-feature comparison, ratings summary, activation/recommendation section, and an FAQ tailored to buyer concerns. Finally, n8n assembles everything into a clean page draft and pushes it to your publishing destination (or keeps it staged in Sheets until you approve it).

What You’re Building

Expected Results

Say you want to publish 10 comparison pages this week. Manually, if each page takes about 3 hours between research, drafting, formatting tables, and writing FAQs, that’s roughly 30 hours. With this workflow, you can queue 10 “X vs Y” rows in Google Sheets, spend about 20 minutes per page reviewing the generated sections, then publish in a batch. That’s about 3 hours of review time instead of a full work week of writing.

Before You Start

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets for product pairs and source data.
  • OpenAI to generate page sections and FAQs.
  • OpenAI API key (get it from your OpenAI dashboard)

Skill level: Beginner. You’ll connect accounts, map a few fields, and run a test row end-to-end.

Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).

Step by Step

A product pair kicks things off. You run the workflow manually (or configure it to read a new/updated row), and the “X” and “Y” names become the source of truth for everything downstream.

Your comparison data gets gathered. n8n pulls your features, pricing records, overview notes, and rating summaries from Google Sheets, then merges them into one structured payload so the writing prompt stays grounded.

OpenAI writes section-by-section. Separate AI steps generate an intro, the comparison table narrative, a “who should choose what” recommendation section, a ratings summary, and a buyer-focused FAQ. Each section is saved back into Google Sheets so you can review without digging through execution logs.

Publishing becomes optional, not scary. The workflow assembles everything into HTML and can send it to your CMS using an HTTP request. If you prefer a manual checkpoint, keep the draft staged in Sheets and publish only the rows you approve.

You can easily modify Google Sheets inputs to include niche-specific fields (like “security” or “integrations”), then adjust the prompts to use those fields in the final copy. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Manual Trigger

Start the workflow manually so you can verify data outputs before publishing comparison pages.

  1. Add the Manual Run Trigger node as your start point (this workflow already uses it).
  2. Click Execute Workflow later during testing to trigger Retrieve Product List.

Step 2: Connect Google Sheets Data Sources

This workflow pulls product, overview, features, pricing, and ratings data from multiple sheets and appends generated content back to sheets.

  1. Open Retrieve Product List and set the Document ID to [YOUR_ID] and the Sheet Name to [[DATA]] Products.
  2. Open Load Overview Records and set the Sheet Name to [[DATA]] Product Overview.
  3. Open Fetch Feature Records and set the Sheet Name to [[DATA]] Features Data.
  4. Open Retrieve Pricing Records and set the Sheet Name to [[DATA]] Product Pricing.
  5. Open Fetch Rating Summary and set the Sheet Name to [[DATA]] Product User Reviews.
  6. For all Google Sheets nodes that append content (Append Intro Sheet, Append Comparison Sheet, Append Activation Sheet, Append Ratings Sheet, Append FAQ Sheet, Store Names Slugs), verify the Operation is append and the target sheet is Test data 1 or the correct destination in your document.

Credential Required: Connect your googleSheetsOAuth2Api credentials to Retrieve Product List, Load Overview Records, Fetch Feature Records, Retrieve Pricing Records, Fetch Rating Summary, Append Intro Sheet, Append Comparison Sheet, Append Activation Sheet, Append Ratings Sheet, Append FAQ Sheet, and Store Names Slugs.

If you duplicate this workflow, reselect the sheet list values so n8n refreshes the Google Sheets metadata.

Step 3: Generate Pair Slugs and Parallel Data Fetching

The workflow builds comparison pairs and immediately fans out to collect overview and storage data in parallel.

  1. In Generate Pair Slugs, keep the JavaScript that creates product pairs and slugs from All Products (this powers page titles and URLs).
  2. Retrieve Product List outputs to Activation Copywriter, FAQ Copywriter, Generate Pair Slugs, Fetch Feature Records, Retrieve Pricing Records, and Fetch Rating Summary in parallel.
  3. Generate Pair Slugs outputs to both Load Overview Records and Store Names Slugs in parallel.
  4. Verify Store Names Slugs maps slug to {{$json.slug}} and Product Vs. Dynamic to {{$json.name}}.
⚠️ Common Pitfall: If All Products has blanks, Generate Pair Slugs will create empty pairs. Clean your product list before running the workflow.

Step 4: Set Up Intro and Comparison Table Generation

Intro text and comparison tables are generated by AI using overview, feature, and pricing data.

  1. Connect Intro Chat Model (model gpt-4o-mini) to Intro Copywriter as the language model.
  2. Ensure Intro Memory Buffer uses Session Key =intro-{{ $json.Provider }} to keep context per provider.
  3. In Intro Copywriter, keep the prompt expression {{$json.Overview}} and reference to {{$('Generate Pair Slugs').item.json.name}}.
  4. Connect Comparison Chat Model to Comparison Table Writer and keep the prompt pulling {{$json.Features}} and {{$json.Pricing}} with the page title from {{$('Generate Pair Slugs').item.json.name}}.
  5. Verify Combine Source Data is set to Mode combine and Number Inputs 3 to combine overview, features, and pricing.

Credential Required: Connect your openAiApi credentials to Intro Chat Model and Comparison Chat Model.

AI memory nodes (Intro Memory Buffer, Comparison Memory Buffer) do not take credentials directly. Add credentials to the parent chat model nodes.

Step 5: Build Activation, Ratings, and FAQ Sections

Three AI branches generate activation guidance, user rating tables, and FAQs in parallel from product data and reviews.

  1. Retrieve Product List outputs to Activation Copywriter and FAQ Copywriter in parallel.
  2. Ensure Activation Copywriter uses {{$json['Product Vs. Dynamic']}} and writes only activation text.
  3. Connect Activation Chat Model (model gpt-4.1) and keep Activation Memory Buffer Session Key .
  4. Fetch Rating Summary runs in parallel and feeds Ratings Table Builder, which uses {{$json['User Rating Summary']}}.
  5. Connect Ratings Chat Model and keep Ratings Memory Buffer Session Key .
  6. Ensure FAQ Copywriter keeps the prompt with {{$json['Product Vs. Dynamic']}} and the Truely bias note.
  7. Connect FAQ Chat Model and keep FAQ Memory Buffer Session Key .

Credential Required: Connect your openAiApi credentials to Activation Chat Model, Ratings Chat Model, and FAQ Chat Model.

Step 6: Append Generated Sections to Sheets and Aggregate

Each AI output is appended to a central sheet and merged into a single record for HTML assembly.

  1. Confirm Append Intro Sheet maps Intro to {{$json.output}}.
  2. Confirm Append Comparison Sheet maps Comparison Table to {{$json.output}}.
  3. Confirm Append Activation Sheet maps eSIM Activation to {{$json.output}}.
  4. Confirm Append Ratings Sheet maps User Ratings to {{$json.output}}.
  5. Confirm Append FAQ Sheet writes the FAQ content (note: field mapping currently uses User Ratings; update if you want a dedicated FAQs column).
  6. Verify Aggregate Sections is set to Mode combine with Number Inputs 6 so all sections and slug data are merged.
⚠️ Common Pitfall: If any append nodes point to the wrong sheet, Aggregate Sections will merge mismatched rows and generate incorrect pages.

Step 7: Assemble HTML and Publish to CMS

The final HTML content is built and sent to your CMS via an authenticated HTTP request.

  1. In Assemble HTML, keep the JavaScript that creates name, slug, and htmlContent and safely inserts section content from fields like Intro and Comparison Table.
  2. In CMS Publish Request, set the URL to https://api.cmsfly.com/api/v1/collections/6855985e93afef001268bfbb/items.
  3. Confirm the body parameters map name to {{$json.name}}, slug to {{$json.slug}}, and htmlContent to {{$json.htmlContent}}.
  4. Set the header parameter X-Dorik-Key to your API key value (replace [CONFIGURE_YOUR_API_KEY]).

Credential Required: Connect your httpHeaderAuth credentials to CMS Publish Request.

Step 8: Test and Activate Your Workflow

Run a full test to verify data retrieval, AI output, sheet updates, and CMS publishing before turning it on in production.

  1. Click Execute Workflow on Manual Run Trigger and watch the parallel branches from Retrieve Product List complete.
  2. Verify that each append node creates a new row with AI outputs in the target sheet.
  3. Confirm Assemble HTML outputs a JSON object containing name, slug, and htmlContent.
  4. Check CMS Publish Request for a successful 200/201 response and verify the page appears in your CMS.
  5. When satisfied, switch the workflow Active toggle on to use it for production runs.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Troubleshooting Tips

  • Google Sheets credentials can expire or need specific permissions. If things break, check the connected Google account and sheet sharing settings in n8n credentials first.
  • 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.

Quick Answers

What’s the setup time for this Sheets OpenAI automation?

About 15 minutes if your Google Sheets and OpenAI accounts are ready.

Is coding required for this comparison page automation?

No. You’ll connect accounts and map fields from Google Sheets into the workflow.

Is n8n free to use for this Sheets OpenAI automation 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, which are usually a few cents per page depending on how long your sections are.

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 modify this Sheets OpenAI automation workflow for different use cases?

Yes, and you probably should. Most teams start by changing the prompts in the Intro Copywriter, Comparison Table Writer, and FAQ Copywriter steps to match their tone and SEO angles. You can also add extra columns in Google Sheets (like “target persona” or “industry”) and pass them into those prompts so each page feels less generic. If you publish to a different CMS, swap the CMS Publish Request step to hit your own endpoint, then keep the rest of the workflow the same.

Why is my Google Sheets connection failing in this workflow?

Usually it’s permissions. Confirm the Google account in n8n still has access to the exact spreadsheet, and that the sheet tabs referenced in the workflow haven’t been renamed. If you recently tightened Google Workspace security, you may need to re-authenticate the credential. It’s also worth checking if you hit Google API quotas when you try to generate big batches at once.

What volume can this Sheets OpenAI automation workflow process?

On n8n Cloud you can comfortably run dozens of pages in a batch; the practical limit is your monthly executions and how hard you push the OpenAI and Google Sheets APIs.

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

Often, yes. This workflow isn’t just “send prompt, get text”; it pulls multiple datasets from Sheets, merges them, runs several AI generations, then assembles HTML and optionally publishes via HTTP. n8n handles that kind of branching and multi-step assembly cleanly, and you can self-host if you don’t want to pay per task. Zapier and Make can still do it, but the scenario gets long quickly, and maintenance becomes its own job. If you’re deciding based on budget, volume, or how custom your CMS publishing is, Talk to an automation expert and we’ll help you pick the simplest option.

Once this is in place, your comparison pages stop being a writing marathon and turn into a repeatable publishing system. Set it up, review the drafts, and move on to the work that actually grows the business.

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