Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / E-commerce & Payments

E-commerce & Payments

Track order status via webhook and email customers with Gmail and Data Tables

Receives order events by webhook, records status history in a Data Table with replay protection, and emails customers through Gmail when status changes.

What it does

## Track orders and serve safe customer status lookups ### How it works 1. Uses separate server-side tokens for the create-only order intake lane and the internal status-update lane; request bodies cannot choose their own authority. 2. Requires explicit source event ids, derives deterministic keys, rejects weak lookup secrets, and checks full Status History before evaluation so accepted or held replays do not write again. 3. Creates one order, records accepted or held status evidence, and persists notification intent before Gmail is attempted. A valid re-entry into an already-notified status still updates the Order and History, but does not insert another pending notification or send Gmail again. 4. Accepts exactly one status object per request, rejects batch-shaped payloads, holds strictly older events, and applies an explicit allowed-edge matrix without guessing. 5. Serves a read-only customer lookup that requires tenant, order, and per-order verifier inputs and returns only order id, visible status, update time, and a safe message. 6. Sweeps for notifications left pending for at least two hours and emails a controlled operations inbox. ### Setup steps - [ ] Create Orders, Status History, and Notifications Data Tables, then re-select them in every table node. - [ ] Set separate ORDER_INTAKE_TOKEN and ORDER_STATUS_TOKEN n8n Variables. - [ ] Connect Gmail and replace ops@example.com with your controlled operations inbox. - [ ] Review the status vocabulary, allowed transitions, notification text, stale threshold, and schedule. - [ ] Test wrong tokens, weak verifiers, status arrays, replay, older and blocked transitions, lookup, Gmail failure, and stale rows while inactive. ### Customization Connect your commerce or fulfilment adapters and adjust approved status wording while preserving tenant-scoped keys, separate authority, persist-before-send ordering, safe lookup projection, and explicit residual handling.

The steps

  1. Order Intake Webhook
  2. Validate Intake Token
  3. Intake Token Authorized?
  4. Respond Intake Unauthorized
  5. Normalize Order Intake
  6. Find Intake Order Row
  7. Build Intake Actions
  8. Status Update Webhook
  9. Validate Status Token
  10. Status Token Authorized?
  11. Normalize Status Update
  12. Find Status Order Rows
  13. Build Status Actions
  14. Filter Intake Sendable Notifications

59 steps in total.

Similar automations