How to Send Personalized Order Confirmation Emails
Create custom order confirmation emails that go beyond the default template.
What This Integration Does
Default platform confirmation emails are functional but forgettable. A bespoke confirmation - one that knows what the customer bought, when it should arrive, and what to do with it - drives repeat orders and reduces support tickets like "where is my order?" or "how do I care for this?". This workflow takes a raw new-order event and turns it into a rich, personalised email that feels handwritten without anyone having to write it.
The run model is per-order. A webhook fires when an order is created, the workflow enriches the order with product detail, formats an HTML email body, and sends it through Resend. There is no persistent state - each run is self-contained, and the execution log keeps a record of every confirmation sent for auditing.
Prerequisites
- A shopify connection (or another store connector) with read access to orders, products, and customers.
- A resend connection with a verified sending domain.
- An HTML email template you can populate with handlebars variables. Keep it simple at first - two columns, product table, footer.
Step 1: Webhook Trigger
Drop a Trigger node and set its type to Webhook. Wire the source store's orders/create webhook to the Spojit endpoint shown in the node. Map the inbound payload so the rest of the workflow can read orderId, customerEmail, and customerFirstName as variables.
Step 2: Enrich the Order
Webhook payloads often miss product images and full variant detail. Add a Connector node pointing at the shopify connector and pick the get-order tool to fetch the canonical order record. Pass orderId from the trigger. The response gives you line items with product handles, prices, and image URLs you can drop straight into the email.
Step 3: Transform - Build the Email Model
Add a Transform node to shape the order into a clean view model the template can iterate over. Project just the fields the email needs:
{
"greetingName": "{{ customerFirstName }}",
"orderNumber": "{{ order.name }}",
"items": [
{
"title": "...",
"image": "...",
"quantity": 1,
"price": "..."
}
],
"subtotal": "...",
"estimatedDelivery": "..."
}
Computed fields like estimatedDelivery can be derived here using a small expression on the order's shipping method.
Step 4: Compose the HTML Body
Add a second Transform node that renders the HTML. Inline the items array as a table, the customer first name in the greeting, and a tailored copy block based on what they bought (for example, care tips for apparel orders, setup links for electronics). Keep the variant logic explicit - hard-coded branches read better than over-clever templating.
Step 5: Send the Email
Add a Connector node pointing at the resend connector and pick the send-email tool. Wire the fields:
to:{{ customerEmail }}from: your verified sender, e.g.orders@yourshop.comsubject:Thanks for your order, {{ greetingName }}!html: the rendered HTML from Step 4
If you prefer SMTP, swap in the smtp connector with send-email - the field set is nearly identical.
Step 6: Handle Failures
Add a Condition node after the send step. If the Resend response indicates a hard bounce or missing email, route to a slack send-message call so support can follow up manually. Spojit's per-node retry settings handle transient API failures automatically.
Tips
- Pre-render a sample email to your own inbox while iterating - what looks fine in code often looks broken in Gmail or Outlook.
- Keep image URLs absolute and HTTPS. Relative paths and HTTP images get blocked by most clients.
- Include a plain-text fallback in the send step. Some corporate email gateways strip HTML.
Common Pitfalls
- Sending from an unverified domain. Resend will accept the API call but the message will land in spam. Run
verify-domainfirst. - Trusting the webhook payload for product details. Shopify sometimes sends partial line items - always re-fetch with
get-order. - Embedding the customer's full address in the subject line. Subjects are logged broadly; keep PII in the body.
Testing
Place a small test order against a dev or staging store. Confirm the webhook fires the workflow, the enrichment populates the right line items, and the email lands looking the way it should. Only then point the webhook at production traffic.