Business ops

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
n8nSource-linked

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.

  1. Copy the prompt (button below).
  2. Open Grok Bot chat and paste it. Replace any [bracketed] placeholders.
  3. Connect the listed tools (as needed) as connectors when Grok Bot asks.
  4. 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

  1. Read the original source for full context.
  2. Connect the tools your agent needs.
  3. Paste the prompt and replace [bracketed] placeholders.
  4. 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

Related use cases

Inbox & communicationWeb · 2026-10

12 of 20 Prompt Injections Worked on His n8n Email Bot, Then 0 of 60: Let Code Make the Decisions, Not the Model

He built an n8n workflow where a small local model reads customer emails and decides priority, refunds and replies, then attacked it with 20 injection emails, 3 runs each. 12 of 20 worked on the plain version (35 of 60 runs), and the usual 'don't follow instructions in the email' prompt made it slightly worse (13 of 20). Taking every decision away from the model fixed it: the model only fills in a form, and a code step strips hidden HTML, keeps secrets out of the prompt and decides what happens. That got 0 of 60. The cost: only 19 of 36 normal emails were answered automatically, down from 31.

  • Level Advanced
  • Setup1–3 hrs*
  • Evidence Strong evidence
n8nSource-linked
MarketingWeb · 2026-10

118 of 120 AI Social Posts Were Bad and 93 Forgot the Link: An n8n Test, and Why Code Checks Still Missed False Numbers

He built a blog-post-to-5-platforms social workflow in n8n two ways and ran both on 8 posts, 3 times each. The one-prompt version produced 118 bad posts out of 120, and 93 left out the blog link. The version with code-checked rules marked 77 posts ready and sent 43 to a human, and none of the 77 failed an independent checker. But when he read them, 10 of 21 in the first round got the blog post wrong, including saying churn rose from 6.1% to 4.3%. His conclusion: code can check format, not truth.

  • Level Intermediate
  • Setup1–3 hrs*
  • Evidence Strong evidence
n8nSource-linked
Business opsReddit · 2026-10

About 2,100 Building Alarms Logged Since March: A Grok Bot Escalates Only the Clusters That Mean a Real Problem

An HVAC controls company's Alarms bot reads every building-automation alarm email and compares it with that site's history. It has logged about 2,100 alarms since March, with weekly to yearly summaries, and escalates only clusters that probably mean a real problem, like a boiler plus fan alarms at a church early on a Sunday. It also caught that a cell carrier had shut off email-to-text, which was silently breaking one site's alerts. A Monday recap goes to the service team.

  • Level Intermediate
  • Setup1–3 hrs*
  • Evidence Strong evidence
Grok BotSource-linked