Marketing · n8n

Trigger Klaviyo Shipping Flow Automatically When Zendrop Marks Orders as Shipped

When Zendrop marks an order as shipped, this workflow instantly sends the customer's data and tracking info to Klaviyo to trigger a post-purchase shipping notification flow. No more manually uploading CSVs or delayed shipping emails.

difficulty Intermediatesetup 45 minresult Customers receive a Klaviyo shipping confirmation email automatically within minutes of Zendrop updating an order to shipped status.
  1. 1

    Catch the Zendrop Shipped Webhook

    Add a Webhook node as the trigger. Set the HTTP Method to POST and note the generated webhook URL. In your Zendrop account under Settings > Webhooks, paste this URL and select the 'Order Shipped' event. This node will receive the payload every time an order ships.

  2. 2

    Filter for Shipped Status Only

    Add an IF node connected to the Webhook node. Set the condition to check that {{$json.body.status}} equals the string shipped (use the exact value Zendrop sends, which may also be Shipped). Route the TRUE branch forward and leave the FALSE branch empty to stop non-shipped events.

  3. 3

    Shape the Data for Klaviyo

    Add a Set node after the IF TRUE branch. Create fields: email mapped to {{$json.body.customer_email}}, order_id to {{$json.body.order_id}}, tracking_number to {{$json.body.tracking_number}}, and tracking_url to {{$json.body.tracking_url}}. This normalizes the payload before sending to Klaviyo.

  4. 4

    Create or Update the Klaviyo Profile

    Add an HTTP Request node. Set Method to POST and URL to https://a.klaviyo.com/api/profiles/. In Headers add Authorization as Klaviyo-API-Key YOUR_PRIVATE_KEY and Content-Type as application/json. In the Body (JSON), send {"data":{"type":"profile","attributes":{"email":"{{$json.email}}"}}}. Store your Klaviyo private API key in n8n Credentials and reference it here. This ensures the profile exists before the event is sent.

  5. 5

    Send the Shipped Event to Klaviyo

    Add a second HTTP Request node. Set Method to POST and URL to https://a.klaviyo.com/api/events/. Use the same Authorization header with your Klaviyo private key. Set the JSON body to {"data":{"type":"event","attributes":{"metric":{"data":{"type":"metric","attributes":{"name":"Order Shipped"}}},"profile":{"data":{"type":"profile","attributes":{"email":"{{$json.email}}"}}} ,"properties":{"order_id":"{{$json.order_id}}","tracking_number":"{{$json.tracking_number}}","tracking_url":"{{$json.tracking_url}}"}}}}. In Klaviyo, create a Flow triggered by the 'Order Shipped' metric to send your shipping email.

Frequently asked questions

What exact status string does Zendrop send in its webhook payload?

Zendrop typically sends the status as 'shipped' in lowercase, but this can vary. Test the webhook by clicking 'Send Test' in Zendrop and inspect the raw payload in n8n's execution log to confirm the exact value before configuring the IF node condition.

How do I create the Klaviyo flow that this workflow triggers?

In Klaviyo go to Flows > Create Flow > Build Your Own. Set the trigger to 'Metric' and choose 'Order Shipped' (it will appear after the first event fires). Then add an Email step with your shipping confirmation template and include dynamic blocks for tracking_number and tracking_url using Klaviyo's event property variables.

Is my Klaviyo private API key safe in n8n?

Yes. Store it as an n8n Generic Credential (Header Auth) rather than pasting it directly in the node parameters. n8n encrypts stored credentials. Never share your workflow JSON publicly if you have hardcoded keys, and rotate the key immediately if you suspect exposure.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.