Auto-Unpublish Shopify Products When Zendrop Shows Out of Stock
Monitors Zendrop for out-of-stock products and automatically unpublishes the matching Shopify listings so customers never see unavailable items. Saves dropshippers from manual checks and lost customer trust.
- 1
Schedule a regular inventory check
Add a
Schedule Triggernode. SetTrigger Intervalto every 1 hour (or 30 minutes for faster response). This node starts the workflow on a timer so Zendrop inventory is checked automatically without manual action. - 2
Fetch out-of-stock products from Zendrop
Add an
HTTP Requestnode namedGet Zendrop Inventory. SetMethodto GET andURLtohttps://api.zendrop.com/v1/products?stock_status=out_of_stock. In theHeaderssection addAuthorizationwith valueBearer YOUR_ZENDROP_API_KEY. This returns a list of products currently out of stock. Store your API key in n8n credentials and reference it here. - 3
Filter only truly out-of-stock items
Add an
IFnode namedCheck Stock Status. Set the condition to:{{ $json.stock_status }}equalsout_of_stock. Items passing the TRUE branch will proceed to be unpublished in Shopify. This guards against false positives from the API response. - 4
Map Zendrop SKU to Shopify product data
Add a
Setnode namedPrepare Shopify Payload. Create a fieldskumapped to{{ $json.sku }}and a fieldproduct_idmapped to{{ $json.shopify_product_id }}. This organises the data needed for the Shopify API call. Note: you must store the Shopify product ID in Zendrop product metadata or a lookup sheet for this mapping to work. - 5
Unpublish the product in Shopify
Add an
HTTP Requestnode namedUnpublish Shopify Product. SetMethodto PUT andURLtohttps://YOUR-STORE.myshopify.com/admin/api/2024-01/products/{{ $json.product_id }}.json. SetBody Content Typeto JSON andBodyto{"product":{"id":"{{ $json.product_id }}","status":"draft"}}. InHeadersaddX-Shopify-Access-Tokenwith your private app token. Setting status todrafteffectively unpublishes the product from your storefront.
Frequently asked questions
What if my Zendrop products don't have a Shopify product ID field?
You will need to create a mapping table — a Google Sheet or Airtable base — that links Zendrop SKUs to Shopify product IDs. Add an extra HTTP Request or Google Sheets node between the IF node and the Set node to look up the Shopify ID by SKU before the unpublish step.
Will this permanently delete my Shopify product?
No. Setting the Shopify product status to `draft` simply hides it from your storefront without deleting any data. When the product comes back in stock in Zendrop, you can create a second workflow that sets the status back to `active` using the same approach.
How do I get my Zendrop API key?
Log in to your Zendrop account, go to Settings, then API Access. Generate a new API key there. Zendrop API access is available on their paid plans. Paste the key into the `Authorization` header of the HTTP Request node as shown in step 2.