Automate DPD Tracking: Real-Time Shipment Tracking with n8n and Make.com
Automatic package tracking updates for DPD shipments to customers.
Do you ship dozens of packages daily with DPD and spend hours manually checking tracking statuses and notifying customers? In this guide, we show you how to fully automate DPD shipment tracking - from automatic status checks to proactive customer notifications.
Why Automate DPD Tracking?
Typical E-Commerce Problems:| Problem | Impact | Solution Through Automation |
|---|---|---|
| Customers asking "Where's my package?" | 30% of all support inquiries | Proactive notifications |
| Manual tracking checks | 2-3 hours/day | Automatic status polling |
| Delays detected too late | Unhappy customers | Real-time alerts |
| No overview of all shipments | Chaos when problems arise | Dashboard with all statuses |
DPD Tracking Options Overview
1. DPD Webservice API (Official)
DPD offers an official API for business customers:
| Feature | Available |
|---|---|
| Shipment tracking | Yes |
| Label creation | Yes |
| Pickup orders | Yes |
| Returns management | Yes |
2. DPD Tracking Page (Scraping)
For smaller volumes without API access:
URL: https://tracking.dpd.de/parcelstatus?query={TRACKING_NUMBER}&locale=en_GB
Note: Scraping may violate terms of service - prefer the API.
3. Tracking Aggregators
Services like AfterShip, Shippo, or 17track aggregate multiple carriers:
| Provider | DPD Support | API | Cost |
|---|---|---|---|
| AfterShip | Yes | Yes | From $9/month |
| Shippo | Yes | Yes | From $10/month |
| 17track | Yes | Yes | Free (limited) |
| ParcelLab | Yes | Yes | Enterprise |
Workflow 1: Automatic Customer Notifications
The Goal
Automatically notify customers via email/SMS when:
- Package shipped
- Package in destination country
- Package out for delivery
- Package delivered
- Problem/delay
The Workflow
New Order (Shopify/WooCommerce)
|
Create shipping label
|
Store tracking number
|
[Loop every 2 hours]
|
Query DPD status
|
Status changed?
|
Yes: Notify customer
Implementation with n8n
Step 1: Collect tracking numbers// Node: Shopify Trigger - Order Fulfilled
// Extract tracking number from fulfillment
const trackingNumber = $json.fulfillments[0]?.tracking_number;
const carrier = $json.fulfillments[0]?.tracking_company;
const customerEmail = $json.email;
const orderId = $json.order_number;
return {
trackingNumber,
carrier,
customerEmail,
orderId,
lastStatus: null,
lastChecked: null
};
Step 2: Query status (with AfterShip)
// Node: HTTP Request
// Call AfterShip API
{
"method": "GET",
"url": "https://api.aftership.com/v4/trackings/dpd/{{ $json.trackingNumber }}",
"headers": {
"aftership-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
}
Step 3: Detect status changes
// Node: IF
// Check if status has changed
const currentStatus = $json.data.tracking.tag;
const lastStatus = $('Get Last Status').item.json.lastStatus;
return currentStatus !== lastStatus;
Step 4: Send email
// Node: Send Email
// Status-specific message
const statusMessages = {
'InTransit': 'Your package is on its way!',
'OutForDelivery': 'Your package will be delivered today!',
'Delivered': 'Your package has been delivered!',
'Exception': 'There is an issue with your delivery.'
};
const subject = statusMessages[$json.status] || 'Update on your order';
Workflow 2: Shipping Dashboard with Real-Time Status
The Goal
A dashboard with all active shipments and their statuses:
- Overview of all packages
- Filter by status
- Alerts for problems
- Statistics (delivery times, etc.)
Implementation with Google Sheets + n8n
Step 1: Record shipmentsShopify Order Fulfilled
|
Google Sheets: New row
- Order ID
- Tracking Number
- Customer
- Ship date
- Status: "Shipped"
Step 2: Regular status updates
Schedule Trigger (every 30 min)
|
Google Sheets: All active shipments
|
For each shipment: Query DPD status
|
Google Sheets: Update status
Step 3: Problem alerts
IF Status = "Exception" OR Delivery time > 5 days
|
Slack Alert to support team
|
Create ticket in Zendesk
Google Sheets Structure
| Order ID | Tracking | Customer | Shipped | Last Status | Status Date | Days in Transit |
|---|---|---|---|---|---|---|
| #1234 | 01234567890 | Max M. | Jan 15 | InTransit | Jan 16 | 2 |
| #1235 | 01234567891 | Anna S. | Jan 14 | Delivered | Jan 16 | 2 |
| #1236 | 01234567892 | Tim K. | Jan 13 | Exception | Jan 16 | 4 |
Workflow 3: Proactive Delay Management
The Goal
Detect delays BEFORE the customer complains.
Logic
// Detect delay
const shipDate = new Date($json.shippedAt);
const today = new Date();
const daysInTransit = Math.floor((today - shipDate) / (1000 <em> 60 </em> 60 * 24));
const isDelayed = (
(daysInTransit > 3 && $json.status === 'InTransit') ||
($json.status === 'Exception')
);
if (isDelayed) {
return {
action: 'proactive_outreach',
message: 'We apologize for the delay...',
compensation: 'discount_code_10'
};
}
Automatic Compensation
Delay detected (> 5 days)
|
Generate discount code (10%)
|
Send apology email
|
CRM: Mark customer as "affected"
DPD API Integration (Technical)
API Authentication
// DPD Cloud API Authentication
const credentials = {
cloudUserId: 'YOUR_USER_ID',
cloudUserToken: 'YOUR_TOKEN',
delisId: 'YOUR_DELIS_ID'
};
// Login Request
const loginResponse = await fetch('https://cloud.dpd.de/api/v1/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: credentials.cloudUserId,
password: credentials.cloudUserToken,
delisId: credentials.delisId
})
});
const { authToken } = await loginResponse.json();
Tracking Query
// Query shipment status
const trackingResponse = await fetch(
https://cloud.dpd.de/api/v1/tracking/${trackingNumber},
{
headers: {
'Authorization': Bearer ${authToken},
'Content-Type': 'application/json'
}
}
);
const tracking = await trackingResponse.json();
// tracking.statusHistory, tracking.currentStatus, etc.
Understanding Status Codes
| Code | Meaning | Customer-Friendly |
|---|---|---|
| ACCEPTED | Package accepted | "Your package has been shipped" |
| ON_THE_ROAD | In transit | "Your package is on its way" |
| OUT_FOR_DELIVERY | Out for delivery | "Will be delivered today" |
| DELIVERED | Delivered | "Successfully delivered" |
| NOT_DELIVERED | Not delivered | "Delivery failed" |
| RETURNED | Return | "Package is being returned" |
Make.com Scenario: DPD + Shopify
Module Setup
- Status changed -> Send email
- Problem -> Slack alert
- Delivered -> Send review request
Example Filter
// Only process status changes
Condition: {{previousStatus}} != {{currentStatus}}
Best Practices
1. Respect Rate Limits
| API | Limit | Recommendation |
|---|---|---|
| DPD API | 100/min | Use batching |
| AfterShip | 10/sec | Add delays |
| 17track | 100/day (free) | Only active shipments |
2. Cache Tracking Data
Don't call the API for every request:
- Status "Delivered" -> Stop polling
- Status unchanged for 1h -> Longer interval
3. Manage Customer Expectations
// Communicate realistic delivery times
const estimatedDelivery = {
'DE_DE': '1-2 business days',
'DE_AT': '2-3 business days',
'DE_EU': '3-5 business days'
};
4. Support Multiple Carriers
// Carrier router
const carrierAPIs = {
'DPD': 'https://api.dpd...',
'DHL': 'https://api.dhl...',
'UPS': 'https://api.ups...',
'Hermes': 'https://api.hermes...'
};
const apiUrl = carrierAPIs[$json.carrier];
Cost-Benefit Analysis
Investment
| Item | Cost/Month |
|---|---|
| n8n/Make.com | 50-120 EUR |
| AfterShip (1,000 shipments) | $9 |
| Setup (one-time) | 1,000-2,000 EUR |
Savings
| Area | Before | After | Savings |
|---|---|---|---|
| Support inquiries "Where's my package?" | 50/day | 10/day | 80% |
| Manual tracking checks | 3h/day | 0h | 100% |
| Complaints about delays | 20/week | 5/week | 75% |
Advanced Integrations
DPD + Klaviyo (Email Marketing)
Tracking events as triggers for email flows:
- Delivered -> Review request after 3 days
- Delivered -> Cross-selling email after 7 days
DPD + Zendesk
Automatically create tickets for problems:
- Exception -> High priority ticket
- > 5 days transit time -> Medium priority ticket
DPD + Slack
Team notifications:
- Daily summary (X packages shipped, Y delivered)
- Instant alert for exceptions
Conclusion
DPD tracking automation is a quick win with high ROI:
- Fewer support inquiries
- Happier customers through proactive communication
- Detect and solve problems early
Next Steps
We support you with shipping automation - from conception to integration.