SMTP and Webhook: Order-Status Notification Email Template
A Spojit template that receives an order-status change from your store via a Webhook trigger and emails the customer a tailored status update from your own SMTP mail server.
What It Builds
This template starts with a Webhook trigger that your store's API calls whenever an order changes status (for example confirmed, packed, shipped, or delivered). The incoming JSON body carries the order number, the customer's email and name, and the new status. A Condition node tailors the message to the status, and a Connector node on the smtp connector uses send-email to deliver a personalized update from your own mail server and domain, so the email arrives from your real "from" address rather than a generic sender.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow with a Webhook trigger that receives an order-status change as JSON containing the order number, customer email, customer name, and new status. Add a Condition node that picks wording based on the status, then send the customer a personalized status-update email from my own mail server using the smtp connector, addressing them by name and including the order number and what happens next.
Connectors Used
- Webhook trigger - your store's API posts the order-status change to the workflow URL; the parsed body is available as
{{ input }}. - http - optional: use
http-getto call your store's REST API for any extra order detail the webhook payload does not include. - smtp -
send-emaildelivers the status update from your own SMTP server and domain;verify-connectionconfirms the connection works.
Customize It
Change the prompt to match your store's status names (such as fulfilled or out_for_delivery), adjust the subject line and body wording for each status, and reference the exact fields your API sends, for example {{ input.order.number }}, {{ input.customer.email }}, and {{ input.status }}. If a status should not email the customer at all, ask Miraxa to add a branch that ends the run quietly for that case.
Tips
- Use Direct mode on the smtp connector node for the
send-emailcall: it is a single predictable action, so it stays deterministic and costs no AI credits. - Verify the smtp connection once with
verify-connectionbefore going live so authentication and the "from" address are confirmed. - Secure the Webhook trigger with a signing connection so only your store's API can start the workflow, and have Spojit return the
202with theexecutionIdto your caller.
Common Pitfalls
- If the email body shows blank values, the field paths in your template do not match the webhook payload: open a run in Spojit and inspect the trigger output under
{{ input }}to get the exact keys. - The same status change can arrive twice if your store retries; enable the Webhook trigger's event-id deduplication so a customer does not receive duplicate emails.
- Mail from a new SMTP domain can land in spam until SPF and DKIM are set up at your provider; send a test to yourself first.
Related
- How to Build a Webhook-Triggered Order Processing Workflow - the step-by-step pattern behind this template.
- How to Send Personalized Order Confirmation Emails - a sibling email workflow.
- How to Send Shipping Confirmation Emails Automatically - another customer-notification flow.