Ops · n8n

Automatically Submit Zendrop Return Requests When Shopify Customers Ask for a Refund

When a Shopify order is tagged for return or a refund is requested, this workflow automatically submits a return request to Zendrop via their API. Store owners save hours of manual back-and-forth every week.

difficulty Intermediatesetup 45 minresult Every qualifying Shopify refund request triggers an automatic Zendrop return submission and logs the result to a Google Sheet for tracking.
  1. 1

    Trigger on Shopify Refund Created

    Add a Shopify Trigger node and set the Topic field to refunds/create. This fires the workflow the moment a customer refund is initiated in Shopify. In the node credentials, connect your Shopify store API key and secret.

  2. 2

    Extract Order and Line Item Details

    Add a Set node called Prepare Return Data. Map orderId to {{$json.order_id}}, lineItemId to {{$json.refund_line_items[0].line_item_id}}, and quantity to {{$json.refund_line_items[0].quantity}}. This creates clean variables for the next step.

  3. 3

    Check That a Line Item Exists

    Add an IF node called Has Line Item. Set the condition: {{$json.lineItemId}} is not empty. Connect the True branch to the next step. The False branch can be left unconnected — requests without line items are skipped automatically.

  4. 4

    Submit Return to Zendrop API

    Add an HTTP Request node called Create Zendrop Return. Set Method to POST and URL to https://app.zendrop.com/api/v1/returns. Under Authentication choose Header Auth and add header Authorization with value Bearer YOUR_ZENDROP_API_KEY. Set Body Content Type to JSON and paste this body: {"order_id": "{{$json.orderId}}", "line_item_id": "{{$json.lineItemId}}", "quantity": {{$json.quantity}}}. Store your API key in n8n credentials and reference it via the node notes.

  5. 5

    Log Result to Google Sheets

    Add a Google Sheets node called Log Return Request. Set Operation to Append. Point it to your tracking spreadsheet and sheet tab. Map columns: Order ID to {{$json.orderId}}, Line Item ID to {{$json.lineItemId}}, Zendrop Response to {{$json.status}}, and Timestamp to {{$now}}. Connect your Google account in credentials.

Frequently asked questions

What Zendrop plan do I need to use their API?

You need Zendrop Plus or Pro to access the API and submit return requests programmatically. Check Zendrop's current pricing page to confirm API availability for your plan.

What happens if a refund has multiple line items?

This minimal workflow processes only the first line item (`refund_line_items[0]`). To handle multiple items, you would add a `Split In Batches` or `Loop` node after the Set node — but that requires expanding the workflow beyond this starter template.

How do I find my Zendrop API key?

Log in to your Zendrop dashboard, go to Settings, then API or Integrations. Copy your API key and paste it into the `HTTP Request` node's Authorization header as `Bearer YOUR_ZENDROP_API_KEY`.

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.