n8n flows
Log Into ShipHero → Auth Cookies
Performs a full browser-style login to the ShipHero web app for a brand and returns the authenticated session cookies.
Logs into the ShipHero web app for a given brand and hands back the authenticated session cookies. Other scenarios use those cookies to call ShipHero's internal dashboard endpoints that require a logged-in session rather than an API token.
At a glance
- Status: Active, but the webhook has been disconnected from the rest of the flow since Oct 12, 2026. It answers
{"message":"Workflow was started"}right away and returns no cookies. Only the manual trigger runs the login. - Trigger: POST webhook (
/webhook/21593503-b13d-4fbb-a61c-d7b550598c48); also a manual trigger. The webhook uses Header Auth with theShipHero Cookies Webhook Secretcredential, so a call without the matchingx-webhook-secretheader gets403. - Runs on: Called on demand by SKU flows that need a live ShipHero dashboard session. The SKU Information Handler and Pull Brand SKUs send the secret through the same credential. The portal's SKU sync calls the URL in
N8N_SHIPHERO_COOKIES_WEBHOOK_URLwithout the secret, so its case check gets403and finds no case components. - Talks to: ShipHero (web login flow); Supabase (credential-lookup RPC).
How it works
- The flow enters via webhook (
body.brand_id) or the manual trigger, which defaultsbrand_idto 1; both funnel through a "Pick One Input" node, which stops the run unlessbrand_idis a positive integer. Get Brand Shiphero Credentialscalls the Supabase RPCget_shiphero_credentialsfor the brand's username and password.- It walks ShipHero's multi-step login redirect chain with redirects disabled and the full response captured: Open First Page, Auth Scopes, Login ID, extract the hidden
statevalue via regex, Verify, Password, Submit, Resume Auth, Do Login. - After each hop,
Cookie Arraycode nodes mergeset-cookieheaders into a running cookie jar, andIfnodes gate each step on the expected HTTP status. - The final merged cookie string is returned via
Send Access Cookies Back.
Notes
- Brittle by design. Each step asserts an exact redirect status, so any change to ShipHero's login flow breaks the chain.
- Retry-on-fail is set on the credential fetch and the response node.
- The response is a logged-in ShipHero session for any brand. Keep the Header Auth secret private. To rotate it, change the value in the
ShipHero Cookies Webhook Secretcredential. Both n8n callers read the same credential, so nothing else needs to change. - Reconnecting the webhook brings back cookies for the n8n callers only. The portal would also need to send the
x-webhook-secretheader before its case check works again.