n8n flows
Delete Voided Shipment Labels (Daily)
Removes shipment records from Supabase whose ShipHero labels were voided on a given day for a given brand.
This flow removes shipment records from Supabase whose ShipHero labels were voided on a given day for a given brand, keeping the Shipments table clean of voided labels.
At a glance
- Status: Active.
- Trigger: Webhook (responds immediately) and a manual Test trigger. Called by the Missing Shipment Data Pull flows with
date,cursor, andbrand_id. - Runs on: One brand and one day per call.
- Talks to: ShipHero GraphQL (per-brand token) and Supabase.
How it works
Choose Trigger To Usemerges the payload (webhook body or test defaults) and stores the args in execution custom data for debugging.Get Brand For Shipmentfetches the brand's ShipHero token, and cursor nodes prime pagination.Get Voided Shipments From Shiphero(ShipHero GraphQLshipments(voided: true, date_from/date_to)) pages 100 at a time; a guard checks for errors, and afterrun-index ≥ 49it stops and waits to restart, otherwise it keeps paging.- It loops shipments, then shipping labels; for each label's tracking number,
Find Shipment Recordlooks it up inShipments. - If found,
Delete Voided Shipmentremoves it by id; otherwise it stores the not-found id for debugging.
Notes
- Designed to be invoked per-brand by the data-pull flows rather than run standalone. It includes an unconnected all-brand scaffold.
- It uses
$execution.customDatato record payload args and not-found ids for debugging.
Related
- Clear Voided Labels (Manual): the manually-run counterpart.
- Missing Shipment Data Pull 2.0 (Backup) calls this webhook to prune voided shipments.
- Missing Shipment Data Pull 2.0 (Reconciliation): the reconciliation copy, also a caller.
- Missing Shipment Data Pull (v1): the original flow.
- Features: Shipments. See also Data flows.
Notify: Shipment Cost Exceeded
Emails brand users when an order's actual shipping-label cost exceeds its postage threshold, with a ShipHero unit-count guard against false positives.
Clear Voided Labels (Manual)
A manually-run counterpart to the daily voided-label cleanup, used to clear voided ShipHero labels from Supabase on demand.