Finance & Ops · n8n

Automatically Log Zendrop Shipping Times into BigQuery for Fulfillment Analytics

This recipe pulls order and shipping data from the Zendrop API and inserts it into a Google BigQuery dataset on a scheduled basis. Data analysts get a continuously updated table of shipping durations ready for reporting and dashboards.

difficulty Intermediatesetup 45 minresult A scheduled pipeline that fetches Zendrop order fulfillment data and appends shipping time records to a BigQuery table every hour, enabling trend analysis without manual exports.
  1. 1

    Schedule the workflow to run hourly

    Add a Schedule Trigger node and set the Rule to run every 1 hour. This kicks off the pipeline automatically so your BigQuery table stays fresh without manual intervention.

  2. 2

    Fetch recent orders from the Zendrop API

    Add an HTTP Request node. Set Method to GET and URL to https://app.zendrop.com/api/v1/orders. In the Authentication section choose Header Auth and add your Zendrop API key as Authorization: Bearer YOUR_API_KEY. Add a query parameter status set to fulfilled to fetch only shipped orders. Store your API key in n8n credentials and reference it here.

  3. 3

    Transform and calculate shipping duration

    Add a Set node to extract and reshape the fields you need. Map order_id from {{ $json.id }}, created_at from {{ $json.created_at }}, shipped_at from {{ $json.shipped_at }}, and shipping_days computed as {{ Math.round((new Date($json.shipped_at) - new Date($json.created_at)) / 86400000) }}. This gives you a clean flat record per order ready for BigQuery.

  4. 4

    Filter out records with missing shipping dates

    Add an IF node. Set the condition to check that {{ $json.shipped_at }} is not empty. Connect the True branch to the BigQuery node so only fully fulfilled orders with a valid ship date are inserted, preventing null errors in your dataset.

  5. 5

    Insert shipping time records into BigQuery

    Add a Google BigQuery node. In Operation select Insert. Set Project ID to your GCP project, Dataset ID to your target dataset (e.g. zendrop_analytics), and Table ID to shipping_times. Map the columns order_id, created_at, shipped_at, and shipping_days from the previous Set node. Authenticate using a Google Service Account credential with BigQuery Data Editor permissions.

Frequently asked questions

What BigQuery table schema do I need to create before running this workflow?

Create a table named `shipping_times` in your chosen dataset with four columns: `order_id` (STRING), `created_at` (TIMESTAMP), `shipped_at` (TIMESTAMP), and `shipping_days` (INTEGER). You can create this in the BigQuery console or via the bq CLI before the first workflow run.

How do I avoid inserting duplicate rows if the workflow runs every hour?

You can add a query parameter to the Zendrop API call to filter orders by a time window, for example only orders fulfilled in the last 60 minutes using `updated_after`. Alternatively, use BigQuery MERGE statements in a scheduled query to deduplicate on `order_id` after insertion.

What if Zendrop returns paginated results with more than one page of orders?

Zendrop's API returns a `next_page` token in the response. For large catalogs you can extend the workflow by adding a loop using n8n's `Split In Batches` node combined with an additional HTTP Request node to fetch subsequent pages. For most stores a single page of recent fulfilled orders per hour is sufficient.

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.