Marketing · n8n

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.

difficulty Intermediatesetup 40 minresult A live PostHog funnel populated with Zendrop order events, ready for conversion analysis and A/B testing insights.
  1. 1

    Create a Webhook node to receive Zendrop order events

    Add a Webhook node as your trigger. Set HTTP Method to POST and copy the generated webhook URL. In your Zendrop dashboard under Settings > Webhooks, paste this URL and select the order.fulfilled event. This node will fire every time an order is fulfilled.

  2. 2

    Extract and normalize the order fields with a Set node

    Add a Set node after the webhook. Create fields such as orderId mapped to {{$json.body.order_id}}, totalPrice mapped to {{$json.body.total_price}}, customerEmail mapped to {{$json.body.customer.email}}, and productName mapped to {{$json.body.line_items[0].name}}. This keeps your PostHog payload clean and consistent.

  3. 3

    Filter out test or invalid orders with an IF node

    Add an IF node 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. 4

    Send the order event to PostHog via HTTP Request

    Add an HTTP Request node on the TRUE branch of the IF node. Set Method to POST and URL to https://app.posthog.com/capture/. In the Body section 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}}"}}}. Replace YOUR_POSTHOG_PROJECT_API_KEY with 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.

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.