Sales email to ShipStation · 2026

Parse a sales email, hold it or build a label

Laboratory

Role
Independent engineer
Stack
Python, FastAPI, Pydantic
Status
Laboratory
Live
scrocle.cloud/demo/shipstation

Problem

Orders arrive as email. Someone copies the ship-to, the SKU, and the qty into ShipStation. A missing ZIP still prints a label. The job is to extract, check, and stop before a bad address ships.

Constraint

This demo does not watch Gmail and does not call a live ShipStation store. Extraction is patterns plus Pydantic, not a model. Production would attach the inbox and POST the same JSON.

Architecture

  1. Sales email
  2. Parse
  3. Validate
  1. ShipStation JSON
  2. Label preview
  3. Hold / review
Email in. Parse and validate. If it is complete, build order and label JSON. If not, hold. No live carrier.

Decisions

  • Check before you print

    A bad city, state, or ZIP goes to hold. The demo will not invent a label for an incomplete address.

  • Payloads you can read

    The create-order and create-label JSON are the same shapes ShipStation expects. You can see them. They are not sent.

Open an inbox message and run it. A complete PO builds order JSON and a fake thermal label. A missing ZIP sits in hold.

If you already have a store in ShipStation and mail that looks like orders, that is the production slice. This page is the extract-and-check part, with the POST turned off.

Outcome

Demo. Live at scrocle.cloud/demo/shipstation. Nine parser tests pass. Not a client job.

What was handed over

  1. How to run the FastAPI demo locally
  2. That ShipStation writes are simulated
  3. What a production inbox watch would add

Open the live demo

Next project Telegram agent walkthrough How a Telegram agent stack is wired