See llms.txt for all machine-readable content.

Back to Templates

Generate and review catalog-based product social posts with Google Sheets and OpenAI

Quick overview

Turn approved Google Sheets catalog facts into product posts for two to four platforms. Validate SKUs, prices and store links, select source evidence with OpenAI, then review exact text in an authenticated form. Download an optional scheduler CSV without publishing automatically.

How it works

  1. Reads up to 1,000 Catalog rows and rejects duplicate product IDs, invalid prices, unsupported currencies, unapproved content and links outside your exact trusted store hosts. Selects at most three ready, previously unapproved product snapshots.
  2. Loads exactly one authoritative, versioned pipeline record from a native n8n Data Table. Saves an exclusive request intent using compare-and-swap before making one OpenAI request, with automatic HTTP retries disabled.
  3. Uses a strict JSON schema to select a neutral hook from an explicit list and one or two evidence IDs for every requested product/platform pair. The model does not write prices, discounts, availability claims or URLs.
  4. Builds each draft from the selected exact source sentences, product title, catalog price and currency, catalog stock status and approved product URL. Validates final platform length, missing pairs, unknown evidence, refusals and incomplete responses.
  5. Saves posts, evidence snapshots and a content hash to the Data Table, then mirrors individual drafts to Google Sheets using RAW values. The mirror is not an approval authority.
  6. The included authenticated review companion downloads an actual posts/evidence/state ZIP and saves exact-version approval or rejection. All issues block approval.
  7. An optional approved CSV outbox remains draft with blank schedule and content_allowed=FALSE; a separate scheduler must perform its own review.

Setup

  1. Start with demoMode=true. Run the main workflow and download the native ZIP from its final Compression node to inspect three synthetic products and nine example posts without credentials or external calls.
  2. Import setup-catalog-environment.json in the same n8n project. Connect Google Sheets OAuth2 to both Google nodes and run once to create separate Catalog/Drafts tabs plus a native Data Table with one initialized pipeline row. Each setup run creates new resources.
  3. Copy spreadsheetId and stateTableId into both worker and review configurations. Keep pipelineId identical. Replace trustedStoreHosts with your exact public shop host and allowedReviewers with actual reviewer emails. Populate Catalog with approved, single-line source descriptions and the documented headers.
  4. Connect Google Sheets OAuth2 and OpenAI API credentials. Select a model supporting strict structured output. After accepting your own API charges, set demoMode=false and aiGenerationEnabled=true, and mark intended source rows content_allowed=TRUE and production_status=ready.
  5. Run one batch manually. Copy its version and content hash into the authenticated review form, download and inspect every exact post, then approve with APPROVE EXACT POSTS or reject with REJECT EXACT POSTS and a reason. Use the new saved version for subsequent downloads.

Requirements

  • Designed for n8n 2.28.6 with native Data Tables and authenticated Forms. Live generation requires Google Sheets OAuth2 and an OpenAI API model supporting strict structured output; API and hosting charges are separate from this USD 5 template. The synthetic demo needs no credentials. Use one initialized pipeline row per state table, public HTTPS store links, unique product IDs, supported currency precision, and two to four configured platforms. Model generation, live Google OAuth, real browser Form authentication and n8n Cloud were not exercised by the isolated mock tests.

Customization

  • Choose two to four of linkedin, x, instagram and facebook; configure a batch limit from one to three products, exact trusted store hosts, reviewer allowlist and supported OpenAI model. Edit approved Catalog facts and ready/permission flags. Hook options are deliberately enumerated to keep free-form product claims out of model output; changing hooks, validation rules or platform limits requires retesting. X length checks conservatively count non-Latin characters and each URL as at least 23 units or its full conservative length, whichever is greater, rather than promising exact platform weighting. Image URLs are optional references only and are not generated or downloaded. An Instagram scheduler may require an actual supported image. Outbox X values are normalized to twitter for the separate scheduler schema.

Additional info

Independent original implementation. Source-grounded checks compare drafts with your approved catalog; they do not independently verify the truth of supplied product claims. No image generation, stock lookup, discount calculation or social publication occurs here. All exports are inactive and live generation is disabled by default. Human approval binds exact text and source snapshots. Ambiguous or failed model requests produce blocking review issues and are not automatically retried. Save/export archived state before the 50-batch history limit. The optional scheduler CSV requires deliberate scheduling, permissions and separate exact-content approval before publication.