Google Sheets sync
Two-way sync between a Google Sheet and your product catalog — pull (upsert by SKU, never deletes) and push (clears stale rows), with a CRON_SECRET-gated cron.
sheetsSync syncs products, stock and prices between your catalog and a Google Sheet via the Sheets API v4, on top of the Google Workspace connector. Merchants who live in spreadsheets get bulk editing without leaving the sheet.
Enable it
/admin/integrations.sheetsSync in /admin/features (runtime — no redeploy)./admin/sheets and run a sync.How sync works
- Pull (sheet → catalog): upserts products by SKU, with a slug fallback. It never deletes catalog rows — a row removed from the sheet is left alone.
- Push (catalog → sheet): writes the current catalog, clearing the range first so a shrunk catalog leaves no stale trailing rows.
- Each run reports added / updated / skipped counts;
needsUpdatediffing keeps it idempotent (re-running changes nothing).
Scheduled sync
/api/cron/sheets-sync runs on a schedule (vercel.json), gated by CRON_SECRET, and no-ops when the flag is off or no spreadsheet/connection is configured.
Tools
The AI/MCP surface gains sheets.sync_now, sheets.pull, sheets.push (scope-gated).
| Flag | sheetsSync |
| Tier | runtime |
| Default | off |
| Needs | Workspace connector + Sheets scope, CRON_SECRET for the cron |
Fail-soft: with no connection the sync is inert. Reuses the existing product CSV import/export logic where possible.
Google Workspace
One shared OAuth2 connector behind Sheets sync, Drive media/backup and Docs import — bring your own Google Cloud client, fail-soft when not connected.
Google Drive media & backup
Import images from a Drive folder into the media library, and push DB/media backups to Drive — reusing the existing media pipeline and backup dump.