Automated DHL shipment tracking bot for web forms and email inquiries
This n8n template automates responses to customer inquiries about DHL shipment status, handling requests from both web forms and emails. Use cases - Automate Customer Support: Provide 24/7 instant answers to the commo...
Template notes
This n8n template automates responses to customer inquiries about DHL shipment status, handling requests from both web forms and emails.
Use cases
- Automate Customer Support: Provide 24/7 instant answers to the common "Where is my order?" question without human intervention. - Reduce Support Tickets: Decrease the volume of repetitive tracking inquiries by providing customers with immediate, self-service information. - Enhance Customer Experience: Offer a consistent and rapid response across multiple channels (your website and email), allowing customers to use their preferred method of contact.
Good to know
- DHL API Key is required: You'll need to register on the [DHL Developer Portal](https://developer.dhl.com/) to get your API key. - This workflow requires Gmail credentials (OAuth2) to monitor incoming emails and send replies. - The webhook URL must be configured in your website's contact or tracking form to receive submissions.
How it works
1. The workflow is initiated by one of two triggers: a Webhook (from a website form) or a Gmail Trigger (when a new email arrives). 2. A Merge node combines the data from both triggers into a single, unified flow. 3. The "Extract Tracking Number" Code node intelligently parses the tracking number from either the form data or the email body. It also extracts the customer's name and email address. 4. The HTTP Request node sends the extracted tracking number to the DHL API to fetch the latest shipment status. 5. The "Format Response Message" Code node takes the API response and composes a user-friendly message for the customer. It also handles cases where tracking information is not found. 6. An If node checks the original source of the inquiry to determine whether it came from the webhook or email. 7. If the request came from the webhook, a Respond to Webhook node sends the tracking data back as a JSON response. 8. If the request came from an email, the Gmail node sends the formatted message as an email reply to the customer.
How to use