A WooCommerce Sales Report as a PDF, Done Right: 7 Edge Cases He Hit Building It in n8n (Time Zones, Refunds, Rial vs Toman)
- Level Intermediate
- Setup1–3 hrs (estimated)
- Evidence Anecdotal
- CostNot stated in source
- No-codeNo
What did they do with n8n?
A builder making an n8n workflow that turns WooCommerce orders into an emailed PDF report shared the edge cases: define 'last 7 days' as full local days, re-filter dates after the API, page through every order and dedupe, treat paid and completed separately, net out refunds, label the report as a snapshot, and check the currency unit against a real order.
How it went
n8n community post by Amin_Mahmodi (Nov 11, 2026 UTC): WooCommerce → PDF report workflow still in progress; seven edge cases including half-open UTC intervals, re-filtering dates, all-or-nothing pagination, date_paid vs status, refunds, snapshot note, and 10x rial/toman currency risk. Still a work in progress; compare totals with the WooCommerce admin before relying on it
Worth knowing
- n8n community post by Amin_Mahmodi (Nov 11, 2026 UTC): WooCommerce → PDF report workflow still in progress; seven edge cases including half-open UTC intervals, re-filtering dates, all-or-nothing pagination, date_paid vs status, refunds, snapshot note, and 10x rial/toman currency risk.
- Still a work in progress; compare totals with the WooCommerce admin before relying on it.
Prompt
Cleaned version rewritten from the source — not a direct quote.
Build an n8n workflow: a form to pick a period (day to year), pull WooCommerce orders for that period in the store's time zone, page through all results and dedupe by order ID, net out refunds, and render an HTML report with charts into a PDF that's emailed to [address]. Stop with an error if any page fails, and print 'snapshot as of [time]' on the report.
Recommended
Try it in Grok Bot
Grok Bot can do this too: connect your store and ask for a weekly sales report with the same checks.
- Copy the prompt (button below).
- Open Grok Bot chat and paste it. Replace any [bracketed] placeholders.
- Connect the listed tools (as needed) as connectors when Grok Bot asks.
- If the task repeats, ask: "Make this a daily routine."
Alternatives: the same prompt works in n8n, Claude, ChatGPT Agent, OpenClaw.
Set it up
Stack: n8n
- Read the original source for full context.
- Connect the tools your agent needs.
- Paste the prompt and replace [bracketed] placeholders.
- Run once manually and check the output before scheduling it.
Generic suggested steps, not from the source.
Evidence
n8n community post by Amin_Mahmodi (Nov 11, 2026 UTC): WooCommerce → PDF report workflow still in progress; seven edge cases including half-open UTC intervals, re-filtering dates, all-or-nothing pagination, date_paid vs status, refunds, snapshot note, and 10x rial/toman currency risk. Still a work in progress; compare totals with the WooCommerce admin before relying on it (as of 2026-11-11)
Source: Web · 2026-11-11 · Verified by us: not yet · Report broken or outdated