Automatically Send Zendrop Order Events to PostHog to Visualize Your Full Purchase Funnel
Every time a new order is fulfilled in Zendrop, this workflow captures the order data and sends it as a tracked event to PostHog so you can analyze your purchase funnel in real time. Growth hackers get instant visibility into conversion rates, order values, and fulfillment patterns without any manual data wrangling.
- 1
Create a Webhook node to receive Zendrop order events
Add a
Webhooknode as your trigger. SetHTTP Methodto POST and copy the generated webhook URL. In your Zendrop dashboard under Settings > Webhooks, paste this URL and select theorder.fulfilledevent. This node will fire every time an order is fulfilled. - 2
Extract and normalize the order fields with a Set node
Add a
Setnode after the webhook. Create fields such asorderIdmapped to{{$json.body.order_id}},totalPricemapped to{{$json.body.total_price}},customerEmailmapped to{{$json.body.customer.email}}, andproductNamemapped to{{$json.body.line_items[0].name}}. This keeps your PostHog payload clean and consistent. - 3
Filter out test or invalid orders with an IF node
Add an
IFnode to guard against test data. Set the condition to check that{{$json.orderId}}is not empty and{{$json.totalPrice}}is greater than 0. Only orders passing both checks flow to PostHog; others are silently dropped, preventing noise in your funnel. - 4
Send the order event to PostHog via HTTP Request
Add an
HTTP Requestnode on the TRUE branch of the IF node. SetMethodto POST andURLtohttps://app.posthog.com/capture/. In theBodysection choose JSON and paste: {"api_key": "YOUR_POSTHOG_PROJECT_API_KEY", "event": "order_fulfilled", "distinct_id": "{{$json.customerEmail}}", "properties": {"order_id": "{{$json.orderId}}", "total_price": "{{$json.totalPrice}}", "product_name": "{{$json.productName}}"}}}. ReplaceYOUR_POSTHOG_PROJECT_API_KEYwith your actual key from PostHog Project Settings. Add a node note: store your API key in n8n Credentials as a header auth or environment variable rather than hardcoding it.
Frequently asked questions
How do I find my PostHog Project API Key?
Log into PostHog, go to Project Settings (gear icon), and copy the value labeled Project API Key. This is a public-safe key used only for event ingestion, so it is safe to include in client-side or server-side calls.
Can I track additional funnel steps beyond order fulfillment?
Yes. Repeat this workflow pattern for other Zendrop webhook events such as order.created or order.shipped, changing the `event` field in the PostHog payload to match each stage. PostHog will then let you build a multi-step funnel across all of them.
What if Zendrop does not support webhooks on my current plan?
You can replace the Webhook trigger with a scheduled HTTP Request node that polls the Zendrop API on a set interval (e.g., every 15 minutes) to fetch recent orders. You will need your Zendrop API credentials and to adjust the field mappings to match their REST API response format.