This is Part 6 and the closing post of the “Restaurant PO Automation” series. Earlier parts built the five-node workflow - Gmail Trigger, PDF text extraction, the Code node, the Google Sheets data model - and added the two QUERY report sheets. This post turns a working canvas into a defensible result: a staged test across four different PDFs, the verification checklist, and how to present the work as a portfolio case.

Series guide: Restaurant Purchase Order Automation: Series Guide & Case Study

1. Why the test plan has three stages

A five-node chain has several independent failure points - attachment handling, text extraction, AI field recognition, row expansion, Sheets mapping. Firing four varied inputs into it at once makes it impossible to tell which layer produced a bad row.

The running workflow is the single source of truth: Gmail Trigger -> Extract From File -> Information Extractor -> Code -> Google Sheets, with the Chat Model as a sub-node of Information Extractor. The plan has three stages: prepare the four PDFs and the Order_Lines sheet; run only PO 01 end to end; then publish the workflow and send the remaining three emails one at a time. Stage one proves the pipeline, stage two proves it generalises, stage three is the record we keep.

The final five-node workflow canvas used for the end-to-end test

2. Preparing four PDFs that are actually different

The client brief is a Singapore warehouse receiving PDF purchase orders from several outlets of one brand, covering produce, protein, frozen and dry goods. Four text-based PDFs simulate that, all from the fictional Harbour Kitchen, each with five lines.

FileOutletDelivery dateLinesTable columns
PO-20261123-001.pdfOrchard2026-11-235Item Code | Product Description | Category | Quantity | Unit
PO-20261123-002.pdfMarina Bay2026-11-235Same layout as PO 01
PO-20261123-003.pdfJurong East2026-11-245Same layout as PO 01
PO-20261123-004.pdfTampines2026-11-245SKU | Item / Description | Qty | UOM

That is 20 lines, 10 per delivery date. SKUs use the VEG-, PRO-, FRZ- and DRY- prefixes for Produce, Protein, Frozen and Dry Goods; units are KG, CTN, BAG and BTL. Three outlet codes appear in the notes: HK-ORC-01, HK-MBY-02 and HK-JRG-03.

PO 04 is the deliberate outlier: a different heading, reordered fields (Purchase Order Reference, Outlet Name, Deliver To, Issued On, Delivery Required, Vendor) and renamed columns. If the AI still extracts it, it is reading business meaning, not matching fixed labels. That is what this test can prove.

We send four separate emails, one PDF each, with Purchase Order in the subject; four attachments in one mail would add a batch-splitting failure mode the MVP does not need. Order_Lines is created up front with its eleven headers.

3. Stage one: one PDF end to end

PO 01 goes through alone. The acceptance condition is not “the nodes are green” but “the sheet is right”: a green execution that wrote wrong data is not a pass.

CheckExpected result
Gmail TriggerOne matching email, one PDF downloaded
Extract From FileFull text containing all 5 product lines
Information ExtractorPO number, dates, brand, outlet, outlet code, 5 line items
CodeOne order object expanded into 5 n8n items
Google Sheets Append Row5 items returned, 5 rows written
Order_Lines5 rows, PO-20261123-001, Orchard, 2026-11-23
Node status5 / 5 successful

The first purchase order written as five rows in the Order_Lines sheet

The first result card reads 1 PDF order / 5 product records / 5 of 5 nodes successful. We do not change the schema or add nodes here; stage two tests whether the same configuration generalises. No OCR was needed, but that is a property of our sample files, not a guarantee about a real client’s documents.

4. Stage two: the remaining three emails

With stage one verified, save the workflow and set it Active / Published so Gmail Trigger polls for new purchase mail. Send the other three emails one by one and watch for three separate successful executions.

OrderOutletDelivery dateExpected new rows
PO-20261123-002Marina Bay2026-11-235
PO-20261123-003Jurong East2026-11-245
PO-20261123-004Tampines2026-11-245
Total3 outlets2 dates15

After each send, check Executions for exactly one new run, then confirm Order_Lines grew by five. Fifteen new rows plus the first five gives 20.

All 20 order-line rows in Order_Lines after the four orders were processed

One warning: never manually re-execute the Google Sheets node for PO 01. Append Row has no deduplication; re-running it turns 20 rows into 25 and makes every downstream number wrong. If a retry is needed, clear the test rows and re-run the whole sequence. In a real system, duplicate detection handles this; in the demo we avoid it by procedure.

5. Final verification

Verify against the source PDFs, not the execution log.

CheckExpected result
Emails processed / PDFs parsed4 / 4
Distinct PO numbers4, no mixing between orders
Order line rows20, excluding the header
Delivery date 2026-11-23 / 2026-11-2410 / 10 rows
Distinct outlets4
Quantities and unitsIdentical to the PDFs, no conversion
VEG-001 / Fresh TomatoesThree separate rows: 20 / 15 / 30 KG

That last check is the most persuasive: if the three Fresh Tomatoes rows collapse into one 65 KG figure, the outlet and date dimensions are lost. It also explains why Daily_Dispatch keeps each outlet distinct while Product_Summary merges the two 2026-11-23 rows into 35 KG.

6. What the fourth PDF proved

PO 04 produced five correct Tampines rows with no schema edit, no per-outlet rule and no new node: evidence the extractor reads field semantics rather than a memorised template.

We did note one inconsistency: on PO 04 the AI returned Vegetables and Meat for Category, where the first three PDFs produced Produce and Protein. We leave it visible rather than quietly correcting it. It is harmless here because neither QUERY report references Category. A small SKU-prefix mapping in the Code node would fix it later, since VEG- already implies Produce and PRO- implies Protein. That mapping is not implemented; it stays a phase-two item.

7. Reading the result card

The MVP result card showing 4 of 4 orders processed, 20 product lines and 5 n8n nodes

The execution-side card confirms the workflow: 4 / 4 orders, 20 product lines, 5 main nodes. The closing summary card is the one we use externally:

Restaurant PO Automation - Test passed - 4 PDF orders / 20 raw order lines / 19 consolidated staging records

NumberLayerSheetMeaning
4IntakeSource PDFsFour purchase orders from four outlets
20Raw detailOrder_Lines, Daily_DispatchEvery line preserved with outlet and date
19StagingProduct_SummaryPrep demand per product, outlet dimension removed

The 20 to 19 difference is one genuine merge into 35 KG. Nothing was dropped; a warehouse-level view simply has fewer rows. Being able to explain that is what makes the result credible.

8. Portfolio positioning

We position the case with the exact wording used at the close of the build:

Title: Restaurant Purchase Order Automation & Daily Dispatch Reporting

Subtitle: AI-powered PDF order extraction, multi-outlet tracking, and automated warehouse dispatch reporting using n8n, Gmail, and Google Sheets.

Three deliverables:

DeliverableWhat it must show
One workflow architecture diagramFive main nodes plus the Chat Model sub-node, feeding the three-sheet workbook
One portfolio caseBusiness problem, approach, and the real 4 / 20 / 19 results
A short videoEmail receipt -> n8n execution -> Sheets auto-summary

The demo script has four steps and deliberately does not walk through every node:

  1. Show emails and PDF purchase orders from four different outlets.
  2. Open one PDF to show product, quantity, unit and required delivery date.
  3. Switch to n8n to show a successful execution after the email trigger.
  4. Open Google Sheets to show the 20 rows, filtered by outlet or delivery date.

The persuasive framing is not the node count but turning unstructured multi-outlet PDF orders into structured dispatch detail a warehouse can use. A buyer needs to see four messy inputs become one reliable daily list.

9. What this demo deliberately is not

This is a DEMO, not a production warehouse system. An automation touching physical dispatch invites assumptions it cannot support: there is no duplicate-order handling, no revised PO handling, no exception review and no audit of dispatched quantities, and it cannot run unattended. A production version would retain the original PDF for audit and route unrecognised rows to human review. Everything else - picking lists, inventory deduction, dispatch emails, Drive archiving, Airtable - is phase two, not built. The build conclusion was blunt: stop adding features. Five nodes plus two spreadsheet formulas already demonstrate the value. A fixed-scope proposal could still use just two milestones, because milestones are billing boundaries, not a mirror of the test plan.

10. The three questions to ask a real client

#QuestionOptions to confirm
1Are the PDFs text-based, scanned, or unknown?Text-based / scanned or image / not yet known
2Roughly how many POs per day?1-20 / 20-100 / 100+ / unknown
3Is the template the same across outlets?One brand template / per-outlet variants / unknown

Question 1 decides whether OCR is required; our text-based PDFs prove nothing about scanned ones. Question 2 decides whether Append Row is adequate at all or volume forces a database from day one. Question 3 decides whether AI is needed or a fixed-rule parser would do. The single most valuable request is one real PO PDF with prices and phone numbers redacted - it settles the text layer, layout consistency and rows per order. The four fictional PDFs are a portfolio artefact, not evidence about a client’s documents.

11. Closing: stop adding nodes, go make the portfolio

The MVP is verified: four PDFs, 20 raw lines, 19 staging records and five unchanged nodes. We proved the pipeline on one input, proved it generalised without a schema edit, and checked against the source PDFs rather than the execution log. What remains is not engineering but one diagram, one case write-up and one short video. Adding nodes now would only add untested claims to a clean result. Build the three deliverables, label the work honestly, and stop.

Series guide & summary: Restaurant Purchase Order Automation: Series Guide & Case Study

Data note: all business data in this series - Harbour Kitchen, its outlets, PO numbers, SKUs, quantities and delivery dates - is fictional mock data for a Self-initiated Demonstration. The 4 / 20 / 19 result is from simulated PDFs, not a live client system.

Related reading