HomeShopify & E-commerceShopify SEO Meta Description Generator With…

Shopify SEO Meta Description Generator With n8n and Gemini

Shopify SEO Meta Description Generator With n8n and Gemini










A Shopify SEO meta description generator built in n8n reads every product in your store, asks Google Gemini to write a search-optimized meta title and meta description, then writes both straight back to Shopify as SEO metafields. Instead of hand-typing search snippets for hundreds of products, you run one workflow on a weekly schedule and let it fill the fields that decide how your products look in Google results. This guide builds the full workflow node by node.

What it does

Shopify gives every product two SEO fields under “Search engine listing”: the page title and the meta description. These map to the global.title_tag and global.description_tag metafields. Most stores leave them blank, so Google falls back to the raw product title and a truncated slice of the description. That fallback rarely reads well and rarely includes the words shoppers actually search for.

This workflow closes that gap automatically. On a weekly schedule it pulls your products from the Shopify Admin API, sends each one to Gemini with a tight prompt, and receives a clean meta title (under 60 characters) and meta description (under 155 characters). It parses the model’s JSON response and pushes both values back onto the product as SEO metafields in a single API call. The next time Google crawls the page, it sees a written-for-search snippet instead of a truncated guess.

Why it beats the default

Writing meta descriptions by hand does not scale. A store with 300 products needs 300 titles and 300 descriptions, each under a character limit, each worded for search intent. Most owners write a handful, get bored, and leave the rest empty.

Paid SEO apps in the Shopify App Store will do this, but they charge a recurring monthly fee and lock your snippets inside their dashboard. This n8n version runs on infrastructure you already control, uses the Gemini free tier, and writes directly to native Shopify fields with no third-party app sitting in the middle. You own the prompt, so you control the tone, the keyword emphasis, and the length. Change one line and every future product follows the new rule.

It also stays current. Because it runs on a schedule, new products added during the week get their SEO fields filled on the next run without anyone remembering to do it.

What you need

  • A running n8n instance (self-hosted or cloud).
  • A Shopify custom app access token with read_products and write_products scopes. Follow connect Shopify to n8n (2026 method) to create the app in the Dev Dashboard and copy the token.
  • A Google Gemini API key from Google AI Studio. The free tier covers the request volume most stores need.
  • Two n8n Header Auth credentials: one holding the Shopify X-Shopify-Access-Token header, one holding the Gemini x-goog-api-key header.

For the wider picture of how Shopify and n8n fit together, the n8n Shopify automation pillar guide walks through auth, nodes, and the common patterns this workflow builds on.

Node-by-node list

  • Schedule Trigger: fires the workflow every Monday at 6am.
  • HTTP Request (Get products): GET the Shopify products endpoint, returning id, title, body_html, product_type, and vendor.
  • Split Out: turns the single products array into one item per product so the rest of the flow runs once per product.
  • HTTP Request (Generate SEO meta): POST each product to the Gemini generateContent endpoint and ask for strict JSON.
  • Edit Fields (Parse Gemini output): read the model’s JSON string and pull out seo_title, seo_description, and the original product_id.
  • HTTP Request (Write SEO metafields): PUT the two metafields back onto the product in one call.

Step-by-step build

  1. Add a Schedule Trigger and set it to run weekly on Monday at 06:00. A weekly cadence is enough for a catalog that changes slowly; move it to daily if you add products often.
  2. Add an HTTP Request node named “Get products”. Method GET, URL https://YOURSTORE.myshopify.com/admin/api/2026-04/products.json?limit=50&fields=id,title,body_html,product_type,vendor. Set Authentication to Generic Credential Type, Header Auth, and select your Shopify credential holding X-Shopify-Access-Token.
  3. Add a Split Out node. Set “Field to Split Out” to products. Now each downstream node runs once per product.
  4. Add an HTTP Request node named “Generate SEO meta (Gemini)”. Method POST, URL https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent. Authentication is Generic Credential Type, Header Auth, using your Gemini credential. Set Body Content Type to JSON and paste an expression that builds the request with JSON.stringify so quotes in your product text cannot break the payload. The prompt asks for a meta title under 60 characters and a description under 155, returned as strict JSON with keys seo_title and seo_description, and sets responseMimeType to application/json.
  5. Add an Edit Fields node named “Parse Gemini output”. Add three string assignments: product_id set to {{ $('Split products').item.json.id }}, seo_title set to {{ JSON.parse($json.candidates[0].content.parts[0].text).seo_title }}, and seo_description set to the same parse with .seo_description. Pulling the id from the Split node keeps each product matched to its own meta text.
  6. Add a final HTTP Request node named “Write SEO metafields to Shopify”. Method PUT, URL https://YOURSTORE.myshopify.com/admin/api/2026-04/products/{{ $json.product_id }}.json, Header Auth with the Shopify credential. Body Content Type JSON, sending a product object with a metafields array: one entry for global.title_tag (type single_line_text_field) and one for global.description_tag (type multi_line_text_field).
  7. Run the workflow once manually with a small limit to confirm the SEO fields fill in on a test product, then raise the limit and let the schedule take over.

Common mistakes

Overwriting snippets you already wrote by hand

This build writes to every product it fetches. If you have hand-crafted meta descriptions on your best sellers, add a filter after Split Out that only keeps products where the SEO metafields are empty, or narrow the initial fetch to a specific collection so it never touches pages you already optimized.

Ignoring the character limits

Google truncates titles around 60 characters and descriptions around 155. The prompt asks for those limits, but the model sometimes runs long. Keep the limit in the prompt and, if you want a hard guarantee, add a short expression that slices the string before it reaches Shopify.

Sending malformed JSON to Gemini

Product descriptions contain quotes and line breaks that break a hand-typed JSON body. Building the body with JSON.stringify in an expression escapes everything for you. Do not paste raw product text between quotation marks in the body field.

Missing the write scope

A token with only read_products fetches products fine but fails silently on the write step. Confirm the custom app has write_products before you blame the workflow.

Cost at realistic volume

The only metered cost is Gemini, and gemini-2.5-flash on the free tier handles a large batch of short prompts per day at no charge. A 300-product store makes 300 small text requests on each run. On a weekly schedule that is 300 requests a week, well inside the free tier. Shopify API calls are free within the standard rate limits, and the workflow’s paced, one-product-at-a-time flow stays under them. If you outgrow the free Gemini tier, the paid rate for flash-class models keeps a full-catalog run in the range of a few cents. Compared with a recurring SEO app subscription, the running cost here is effectively zero.

Ready-to-import template

The guide above is free to follow and builds the complete workflow by hand. If you would rather skip the setup, the ready-to-import template drops all six nodes into n8n already wired, so you only add your two credentials and your store URL.

Download the template ($19) →

Want it built and running in your store without touching n8n? Our done-for-you automation service installs and configures it for you.

FAQ

Does this change my product descriptions on the storefront?

No. It only writes the SEO metafields, which control the title and description Google shows in search results. Your on-page product title, body copy, images, and price stay exactly as they are. The workflow never touches the visible product content that shoppers read on the page.

How often should the workflow run?

Weekly suits most stores because catalogs change slowly. If you add products several times a week, switch the Schedule Trigger to daily so new items get their SEO fields filled quickly. There is no cost penalty to running more often within the Gemini free tier and Shopify rate limits.

Will it overwrite meta descriptions I wrote myself?

By default yes, because it processes every product it fetches. Add a filter after the Split Out node that keeps only products with empty SEO metafields, or point the fetch at a single collection. That way the workflow fills the gaps and leaves your hand-written snippets untouched.

Which Gemini model does it use?

The build uses gemini-2.5-flash, a fast, low-cost model that handles short SEO copy well and stays inside the free tier for typical catalog sizes. You can swap the model name in the URL for a larger one if you want longer or more nuanced copy, at a slightly higher cost per run.

Do I need a paid SEO app as well?

No. This workflow writes to the same native Shopify SEO fields a paid app would edit, using the Admin API directly. You keep full control of the prompt and pay nothing recurring. An app still helps with sitewide audits, but for generating product-level meta text this covers the job.

Related guides