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
- Order Intake Webhook
- Validate Intake Token
- Intake Token Authorized?
- Respond Intake Unauthorized
- Normalize Order Intake
- Find Intake Order Row
- Build Intake Actions
- Status Update Webhook
- Validate Status Token
- Status Token Authorized?
- Normalize Status Update
- Find Status Order Rows
- Build Status Actions
- Filter Intake Sendable Notifications
59 steps in total.
Similar automations
AI Agents & AssistantsAnswer Vapi order-status calls and log callbacks in Data Tables24 stepsFinance, Invoices & AccountingTrack purchase order delivery status and amount variances with GoHighLevel6 stepsChatbots & Messaging BotsHandle WhatsApp customer chats with an OpenAI agent and Data Tables34 stepsEmail AutomationTrack complaint SLAs and escalation alerts with Gmail and data tables41 steps