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.
- 1
Trigger on Shopify Refund Created
Add a
Shopify Triggernode and set theTopicfield torefunds/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
Extract Order and Line Item Details
Add a
Setnode calledPrepare Return Data. MaporderIdto{{$json.order_id}},lineItemIdto{{$json.refund_line_items[0].line_item_id}}, andquantityto{{$json.refund_line_items[0].quantity}}. This creates clean variables for the next step. - 3
Check That a Line Item Exists
Add an
IFnode calledHas Line Item. Set the condition:{{$json.lineItemId}}is not empty. Connect theTruebranch to the next step. TheFalsebranch can be left unconnected — requests without line items are skipped automatically. - 4
Submit Return to Zendrop API
Add an
HTTP Requestnode calledCreate Zendrop Return. SetMethodtoPOSTandURLtohttps://app.zendrop.com/api/v1/returns. UnderAuthenticationchooseHeader Authand add headerAuthorizationwith valueBearer YOUR_ZENDROP_API_KEY. SetBody Content TypetoJSONand 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
Log Result to Google Sheets
Add a
Google Sheetsnode calledLog Return Request. SetOperationtoAppend. Point it to your tracking spreadsheet and sheet tab. Map columns:Order IDto{{$json.orderId}},Line Item IDto{{$json.lineItemId}},Zendrop Responseto{{$json.status}}, andTimestampto{{$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`.