How to Use PO Automation

A plain-language guide to how incoming purchase orders flow through the system, what each tool does, and what to do when something needs a human. (For the technical build details, see the full project spec instead.)

Live in production orders@esqembroidery.com
1

The Big Picture

Every email to orders@esqembroidery.com is automatically read by AI, sorted into the right category, and — if it's a purchase order — turned into a row in the PO Queue Google Sheet with the order details already filled in. A human reviews the row, confirms the embroidery design and the customer contact are matched correctly, then clicks a button to send it to FileMaker.

Nothing gets written to FileMaker automatically. Every push is a deliberate human click, after review.

2

What Happens to Every Email

1
Email arrivesA Gmail filter tags it n8n/pending if the subject looks like a PO ("PO", "PO#", or "Purchase Order").
2
AI reads itClassifies as PO, Question, Supply Order, Revision, or Needs Review — and if it's a PO, extracts the order number, quantity, ship-to address, embroidery instructions, etc.
3
Row appears in a Sheet tabPO Queue for real orders, or the matching tab for Question/Supply Order/Needs Review/Revision. The email gets relabeled to match (see Section 8).
4
You review the rowCheck the design match (DST Picker) and the customer contact (Personnel Picker) if either is unmatched. See Section 3.
5
You click "Push →"Sends the order to FileMaker as an @Order record (plus Ship To and DST design links). See Section 6.
⚠️
If a real order email doesn't show up in PO Queue within a few minutes, the subject line probably didn't contain "PO"/"PO#"/"Purchase Order" — the filter never saw it. Use Force Process as PO (Section 7) instead of waiting.
3

Reviewing a PO in the Sheet

Open the PO Queue tab. Each row is one order. A few columns matter most for review:

ColumnWhat it means
picker_link"Review →" — opens the Personnel Picker to confirm/fix the matched company + contact for this PO. Always shown, even on a confident auto-match, so you can double-check.
company_master_id / personnel_idBlank means the AI couldn't confidently match a customer contact — use the picker link before pushing.
Instructions DisplayPlain-language summary of detected flags (Rush, Pick-Up, Split Shipping, 3rd Party, etc.) — a quick sanity check that the AI read the PO correctly.
push_link"Push →" — opens the FileMaker push confirmation page (Section 6). Shown once company/personnel are set, regardless of whether a design is matched yet.
Row background colorLight red = something's missing (company/personnel/design). Grey = already sent to FileMaker. Red = a push was attempted and failed — check fm_error for why.

Check the DST Items tab (linked rows below the same PO) for the embroidery design match — see Section 4 if it's not matched yet.

4

DST Picker — Matching a Design

Every embroidery placement on a PO needs to be linked to an actual digitized design file in FileMaker. The AI tries to match by name automatically:

  • Exactly one match — filled in automatically, no action needed (though the row still shows a review link).
  • Multiple possible matches — a picker link appears on the DST Items row. Click it, search visually (with thread color swatches and prior-order history), and pick the right one.
  • No match found — same picker link, search from scratch or flag it for manual FileMaker lookup.

Open DST Picker

ℹ️
You don't have to resolve the design before pushing to FileMaker — see the "Push Anyway" note in Section 6. A design can always be matched later by coming back to this picker.
5

Personnel Picker — Fixing Company/Contact

Click any PO Queue row's "Review →" link to open this. It shows candidate customer contacts (matched by the sender's email address) — confirm the right one, or search by name/email/company if the AI's guess was wrong or ambiguous.

Open Personnel Picker

6

Pushing to FileMaker

Click "Push →" on a PO Queue row. You'll see a summary page — customer, company, contact, ship-to address, and every DST item on the order — before anything is sent.

  • If company or contact is still unmatched, the page blocks the push and tells you what's missing (go fix it via the picker links first).
  • If a DST item has no design match yet, you'll see a yellow warning and the button reads "Push Anyway" — clicking it pops a confirmation, then creates the Order and Ship To normally, just skipping that one design link (FileMaker requires an actual design match to create that record — there's no way to save a placeholder). Go back and match the design later; it won't create a duplicate order.
  • Once sent, the row turns grey and fm_status shows "Sent" — pushing again is blocked unless that's cleared manually first.
  • If a push fails, the row turns red and fm_error shows FileMaker's exact error message. Fix the underlying issue and try again — failed rows can always be retried.
7

Force Process as PO

Use this when an order never showed up in PO Queue automatically — almost always because the subject line was missing "PO"/"PO#"/"Purchase Order" (e.g. a customer just wrote the bare number, like "56348"). It's also useful if an email got sorted into the wrong tab (e.g. mistaken for a Supply Order) and you want to force it through as a real PO instead.

  1. Open Force Process as PO and type the PO number.
  2. You'll see every matching email to orders@ — subject, sender, date. Read carefully if there's more than one: sometimes a PO number shows up on an unrelated document too (e.g. a blank-garment supply order from the same vendor, or a reply in the same thread). Pick the one that's actually the customer's order.
  3. Click "Process this one," confirm the popup, and it runs straight through extraction and lands in PO Queue — same as if the filter had caught it automatically, just skipping the AI classification step since you've already told it "this is a PO."
⚠️
This tool bypasses classification entirely — it will process whatever email you pick as a PO even if the content isn't actually a purchase order. Double-check the sender and subject before clicking "Process."
8

Gmail Labels — What They Mean

LabelMeaning
n8n/pendingWaiting to be processed. If an email sits here more than a few minutes, something's wrong — check the sender/subject, or use Force Process as PO.
n8n/PO-processedSuccessfully turned into a PO Queue row.
n8n/Supply-OrderRecognized as blank garments being shipped to Esquire (not a customer order) — logged, no PO Queue row created.
n8n/QuestionA customer question, not an order — logged for reference.
n8n/Needs-ReviewThe AI wasn't confident enough to auto-classify — check the Needs Review sheet tab.
n8n/RevisionRecognized as a follow-up/change request on an existing order, not a new one.
⚠️
Never manually remove n8n/pending — let the system do it after processing. And be careful applying labels from Gmail's inbox list view: it labels the whole email thread, not just the message you're looking at — open the specific message first if you need to label just one.
9

Common Situations

SituationWhat to do
Order never appeared in PO QueueUse Force Process as PO (Section 7)
Design not matched on a DST Items rowClick its picker link, search in DST Picker (Section 4)
Company/contact blank or wrong on a PO Queue rowClick "Review →", fix in Personnel Picker (Section 5)
Need to push without a design matched yetClick "Push Anyway" on the warning — see Section 6
Push failed (row is red)Read fm_error on the row, fix the issue, retry — failed pushes can always be retried
Same PO number used by two different documents/customersRead the email list carefully in Force Process as PO before picking one (Section 7)
Not sure what a Gmail label meansSee Section 8