n8n flows
Insert Customers by Order
Inactive backfill that creates end-customer records from ShipHero order addresses and links each order to its customer.
A one-off backfill that populates end-customer (Amazon buyer) records from ShipHero order shipping addresses and links each Supabase order to its customer record.
At a glance
- Status: Inactive
- Trigger: Manual ("When clicking 'Test workflow'"). No production trigger.
- Runs on: Hand-run migration and backfill only.
- Talks to: ShipHero (GraphQL); Supabase (
Orders,End Customer (Amazon buyer)).
How it works
SupabasereadsOrders(getAll, limit 500), thenGet Order Details From Shipherofetches the shipping address per order number.Loop Over Itemsiterates orders;Supabase1tries to find an existingEnd Customer (Amazon buyer)by full name plus address line 1.If1branches on whether the customer was found.- Not found: insert a new End Customer row, then update the order's
End Customer (Amazon buyer)_id. - Found: update the existing customer's order date, then link the order.
Notes
- Inactive migration/backfill utility.
- Dedupes customers by name plus address before inserting.