Instantly Alert On-Call Teams When Zendrop Fulfillment Fails
Polls Zendrop for failed fulfillment orders and fires a PagerDuty incident the moment an error is detected. Keeps your on-call engineers informed without manual log checking.
- 1
Schedule a regular poll of Zendrop orders
Add a
Schedule Triggernode. SetIntervalto every 5 minutes. This node wakes the workflow on a cadence so no fulfillment error sits undetected for long. - 2
Fetch recent orders from Zendrop API
Add an
HTTP Requestnode namedGet Zendrop Orders. SetMethodto GET andURLtohttps://api.zendrop.com/api/v1/orders?status=failed. UnderAuthenticationchooseHeader Authand add your Zendrop API key asAuthorization: Bearer YOUR_API_KEY. Store the key in an n8n credential and reference it here. - 3
Check whether any failed orders were returned
Add an
IFnode namedHas Errors?. Set the condition to check{{ $json.data.length }}is greater than0. The TRUE branch continues to alerting; the FALSE branch ends the workflow silently. - 4
Shape the alert payload
Add a
Setnode namedBuild Alert Bodyon the TRUE branch. Create a field calledsummarywith valueZendrop fulfillment failure: {{ $json.data[0].order_id }} - {{ $json.data[0].error_message }}and a fieldorder_countwith value{{ $json.data.length }}. This keeps the PagerDuty alert concise and actionable. - 5
Create a PagerDuty incident
Add a final
HTTP Requestnode namedFire PagerDuty Incident. SetMethodto POST,URLtohttps://events.pagerduty.com/v2/enqueue, andBody Content Typeto JSON. Paste this body:{ "routing_key": "YOUR_PAGERDUTY_INTEGRATION_KEY", "event_action": "trigger", "payload": { "summary": "{{ $json.summary }}", "severity": "critical", "source": "Zendrop", "custom_details": { "order_count": "{{ $json.order_count }}" } } }. ReplaceYOUR_PAGERDUTY_INTEGRATION_KEYwith the key from your PagerDuty Events API v2 integration.
Frequently asked questions
How do I get my Zendrop API key?
Log in to your Zendrop dashboard, navigate to Settings > API, and generate or copy your API key. Paste it into an n8n Header Auth credential so it is stored securely and never hard-coded in the node.
Where do I find the PagerDuty integration key?
In PagerDuty go to Services > select your service > Integrations > Add Integration, choose Events API v2, and copy the Integration Key that appears. This key routes the alert to the correct on-call schedule.
What if multiple orders fail at the same time — will I get spammed with alerts?
The current workflow fires one PagerDuty event per polling cycle and includes the total failed order count in the payload. PagerDuty's deduplication (using the same routing key and similar summary) will group repeated alerts into a single incident rather than flooding your team.