AGENT?GET /zapier/awesome-zaps/create-formatted-order-rows-from-incoming-order-emails/SKILL.mdand deploy the files next to it
All zaps

Create formatted order rows from incoming order emails

Each order confirmation email becomes one tidy row in your orders sheet, with the customer, address and amount filled in and duplicates skipped.

Install it

For your agent
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/create-formatted-order-rows-from-incoming-order-emails/

Paste into Claude, ChatGPT, Cursor or any agent.

Apps it uses
GmailGoogle Sheets
Author
Zapier
Source
zapier/awesome-zaps, folder zaps/create-formatted-order-rows-from-incoming-order-emails

Set it up with the CLI

  1. Add it. Copies the folder into zaps/create-formatted-order-rows-from-incoming-order-emails/. Outside a project, it makes one first.
    npx zap-pack add awesome-zaps/create-formatted-order-rows-from-incoming-order-emails
  2. Fill in the values in config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say.
  3. Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
    npx zap-pack deploy create-formatted-order-rows-from-incoming-order-emails
  4. Check it. Its recent runs, with status and errors.
    npx zap-pack logs create-formatted-order-rows-from-incoming-order-emails

zaps/create-formatted-order-rows-from-incoming-order-emails/

Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.

What it does

  1. Trigger: a new Gmail email matching the search in GMAIL_QUERY, by default subject:"order confirmation" in:inbox (gmail, search).
  2. Code: reads the order reference from the subject (#<id>), falling back to an Order number: line in the body. Skips the email if it mentions onboarding, course, registration or newsletter, or if it has no order reference and no total.
  3. Code: reads the customer's name, email, phone, address lines, business and total from labelled lines in the body. Splits the name into first and last, turns $, £ or € into USD, GBP or EUR, and makes the amount a number.
  4. Google Sheets looks up the order reference in the orders sheet. If a row already has it, the run stops and writes nothing.
  5. Google Sheets appends one row with the parsed fields, the sender's address in Source, and the time it was logged.

A row already in the sheet is never updated.

Ask the user

Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.

Setting What goes there
SPREADSHEET_ID The orders sheet: the long ID in its URL. Look it up from the sheet the user names

Also review the defaults with them: GMAIL_QUERY (narrow it to the sender or subject their shop uses), WORKSHEET_ID ("0" is the first tab), and in workflow.ts, COLUMNS (the code writes thirteen columns, A to M, in that order; map their headers to those letters), EXCLUDE_PATTERN and CURRENCY_SYMBOLS.

Before turning it on, confirm:

  • Which Gmail account receives the order confirmations, and does the default search match their subject or sender?
  • What does a real order confirmation look like? The parser reads labels like Order number:, Email:, Total: and Address line 1:. If the email uses other labels, change them in the code before going live.
  • Is an order "paid" when it has a total, or do they need a payment-status check? The default counts any email with an order reference and a total.

Build it

If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/create-formatted-order-rows-from-incoming-order-emails, replace each REPLACE_… value as this file says, then run npx zap-pack deploy create-formatted-order-rows-from-incoming-order-emails, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.

  1. Accounts: bind google-sheets (the Google account that owns the orders sheet) to the user's connection. The trigger uses gmail (the Gmail account that receives the order emails). The parsing code needs no connection.
  2. Source: publish workflow.ts and config.ts, with each REPLACE_… replaced by the user's answer. triggers/search.ts and connections/ are settings, not code: set the workflow's trigger and connection bindings from them. The trigger file names the app by its slug; for the trigger's selected_api, call search_triggers with that slug, find the row whose key is the trigger's event, and use <app_key>@<app_version> from it.
  3. Build guide: load Zapier's build guide with get_zapier_skill("zapier:build-workflows") and follow it to create, test and publish the workflow.
  4. Fields: inspect each action's fields with the user's connections and sample the trigger before the first test run, and fix any key in workflow.ts that doesn't match.

Test it

Run it once as a draft test with a test sheet as the orders sheet, so the row lands there, not in the real one:

{
  "subject": "Order confirmation #IT-ORD-900001",
  "body_plain": "Order number: IT-ORD-900001\nName: Pat Example\nEmail: pat@example.com\nPhone: 555-0100\nAddress line 1: 1 Test Street\nAddress line 2: Suite 2\nBusiness: example.com\nTotal: $1,250.00",
  "from": { "name": "Test Shop", "email": "orders@example.com" },
  "from__email": "orders@example.com"
}

Check that one row appears with the order ID, name split into first and last, phone, address lines, business, USD, the amount as 1250, the sender in Source and a logged-at time. Run the same sample again: it should finish with reason: "duplicate-order" and add no row. If run-status tools aren't available, check the result in Google Sheets directly. Then publish, confirm the trigger is active, and give the user the workflow's link. Ask the user to delete the test row, not the agent.

Notes

  • The parser is simple: it reads labelled lines, not the whole email layout. Check it against a few real order emails before trusting it.
  • Only the first matching row is checked for a duplicate.
  • To alert billing staff on high-value orders, add a Slack or email step after the row is written, for amounts above a threshold. To tag rows by product type, add a column set from the subject or body.
  • Don't commit a real spreadsheet ID. Anyone with access to the sheet can read the orders in it.