Back/Operations/Goose
IntermediateOperations

How to Automatically Create an E-commerce Product Catalog from a CSV using an AI Agent

Turn a reviewed source file into a Square product catalog by mapping fields explicitly, previewing the proposed creates and updates, applying idempotent batches, and reconciling the live catalog before generating payment links.

How to Automatically Create an E-commerce Product Catalog from a CSV using an AI Agent

Brad enables the Square MCP, gives Goose the farm stand CSV, and asks it to create items in an empty Square catalog. Goose maps the source rows to catalog objects, creates categories and products, and then generates a real payment link from the resulting account.

Before you start

What you need

  • A test or authorized Square account with a scoped credential
  • A reviewed CSV containing stable source IDs, names, descriptions, categories, prices, currency, tax, and availability
  • A field mapping and rules for variants, images, modifiers, duplicates, and deletes
  • A dry run output with proposed creates, updates, skips, and errors
  • A rollback, reconciliation, and ownership plan for the live catalog

What you’ll make

A reconciled Square catalog whose items trace back to source rows, preserve price and tax semantics, can be safely rerun, and produce tested payment links only for the intended products.

Tools used

  • Goose

    Open-source AI agent by Block for automating tasks

Step by step

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

4 steps

Step01

Enable the Square MCP

Enable the official Square MCP for the intended sandbox or merchant account with only the catalog permissions needed. Confirm the account, environment, available tools, and whether each tool reads or mutates data.

Step02

Prompt Goose to Populate the Product Catalog

Ask Goose to profile the CSV and map each source field to Square before writing. Require a dry run with normalized prices, proposed categories, variants, duplicates, skips, and errors.

Example prompt
Prepare a dry run to import [CSV path] into the Square catalog for [sandbox or merchant]. Map stable source ID, item name, description, category, price in minor units, currency, tax, variants, modifiers, and availability. Query existing mappings first. Return creates, updates, unchanged, skipped, and errors. Do not write yet and never delete based only on absence.
Step03

Verify the Automated Catalog Creation

Inspect and sample the dry run, then apply a small idempotent batch. Reconcile Square object IDs, source IDs, names, prices, currency, variants, taxes, and category assignments before continuing with the full catalog.

Step04

Generate a Payment Link on the Fly

Generate a payment link only after the target item has been reconciled. Confirm test versus live mode, item, quantity, amount, currency, inventory and expiration behavior, then open the link as a customer without completing an unintended charge.

Example prompt
Create a payment link for catalog item [verified Square item ID], quantity [quantity], in [test or live environment]. Before creation, echo merchant, item, current price, currency, inventory behavior, and expiration. Do not substitute another item or amount.

What good looks like

  • Every catalog item has a stable idempotency key or source identifier.
  • Prices, currency, variants, tax treatment, availability, and categories match the reviewed source and spot checks.
  • A rerun creates no unintended duplicates and never deletes or overwrites records without an explicit rule.
  • Payment links resolve to the correct test or live item, amount, currency, inventory behavior, and merchant account.

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

After the steps

Runbook notes

How to recover when the loop fails and where human judgment helps.

Recover

If it goes sideways

A demo prompt writes directly to the wrong live merchant account
Confirm environment and merchant identity, use a sandbox first, and require a dry run before live writes.
Prices are parsed with the wrong decimal, currency, unit, or tax treatment
Normalize to integer minor units, validate currency and tax fields, and reconcile sampled rows before apply.
Retries or fuzzy names create duplicate products and categories
Use stable source IDs and idempotency keys, query existing mappings, and make reruns safe.
Rows missing from one export cause valid catalog items to be deleted or disabled
Treat absence as no change unless an explicit, reviewed deletion feed and policy says otherwise.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready