Automate Custom Order Confirmations with PDFs

Automate Custom Order Confirmations with PDFs

Ever wish you could send beautifully branded, custom PDF order confirmations to your customers, automatically, with zero manual work? In this step-by-step guide, I’ll show you how to connect Shopify, a PDF generator, and Gmail with the n8n automation tool—so your store runs smoother, looks more professional, and you get those precious hours back every week.

Why Automate This?

Manually sending order confirmations is slow, easy to mess up, and, honestly, not how you want to spend your afternoons. Automating the whole process means:

  • Customers get their confirmation (with all their order details) within seconds of checkout
  • You show off your brand with pro-looking PDFs every time
  • Less chance of human error—no more “Oops, forgot to attach the file” moments
  • Your team is freed up to focus on what matters (not admin work)

Step-by-Step Setup

Here’s how you can connect everything and start automating (no coding background needed). You’ll use Shopify as your trigger, n8n to glue everything together, a PDF tool (like pdforge or CraftMyPDF) to generate the document, and Gmail to send it out.

1. Shopify Webhook: Trigger the Workflow

What’s happening: As soon as someone places an order on your Shopify store, Shopify pings n8n with all the order info—automatically.

Workflow visual: Shopify → n8n Webhook (Start)

In n8n, set up a webhook node to catch the order data Shopify sends. Here’s a sample JSON payload you might get:

{
  "id": 15421345,
  "created_at": "2025-06-12T14:23:58Z",
  "customer": {
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane@shopper.com"
  },
  "line_items": [
    {
      "title": "Mid-Century Lamp",
      "quantity": 1,
      "price": "129.95"
    }
  ],
  "total_price": "129.95"
}

Tips for customizing: Add more Shopify fields or include tags (like “gift purchase”) to tweak your PDFs or emails later. n8n lets you filter orders (e.g., only send PDFs for wholesale customers).

2. PDF Generator API (like pdforge or CraftMyPDF)

What’s happening: n8n takes the order details and sends them to your PDF generator of choice. These tools use templates, so every PDF matches your brand (fonts, colors, logos).

Workflow visual: n8n Webhook → HTTP Request Node → PDF Generator API

To generate the PDF, use an HTTP Request node in n8n, sending your order info to your PDF tool’s API. Here’s what a typical payload looks like:

{
  "template_id": "shopify-confirmation-v1",
  "data": {
    "customer_name": "Jane Smith",
    "order_id": 15421345,
    "items": [
      { "name": "Mid-Century Lamp", "qty": 1, "price": "129.95" }
    ],
    "total": "129.95"
  }
}

Tips for customizing: Most PDF generators have drag-and-drop editors—use these to design your order confirmation. You can send in any data Shopify provides, like shipping addresses or coupon codes.

3. Gmail Node: Send the PDF as an Email Attachment

What’s happening: Once the PDF is ready, n8n’s Gmail node grabs it and fires off a friendly email to your customer, attaching the custom PDF.

Workflow visual: HTTP Request Node (PDF) → Gmail Node (Send Email with Attachment)

To send the file, select the “Send Email” operation in the Gmail node and use the PDF-generated binary data as an attachment. Here’s the info you might pass:

{
  "to": "jane@shopper.com",
  "subject": "Your Order Confirmation #15421345",
  "text": "Hi Jane,\n\nThanks for your order! See the attached PDF for your receipt.\n\nCheers,\nThe Lamp Shop",
  "attachments": [
    {
      "filename": "LampShop-Order-15421345.pdf",
      "content": ""
    }
  ]
}

Tips for customizing: Adjust your email template with personalized greetings, tracking links, or coupon codes for next time. Pro tip: set up error notifications to alert you if an email doesn’t go out.

4. (Optional) Google Sheets Node: Update Your Inventory

What’s happening: Keep your inventory in sync. Add a step so that after sending the PDF, n8n updates a row in Google Sheets with the product, quantity, and buyer’s info. Super handy for small shops without full-blown inventory systems.

Workflow visual: PDF & Email Steps → Google Sheets Node (Append Row)

{
  "date": "2025-06-12",
  "product": "Mid-Century Lamp",
  "quantity": 1,
  "customer": "Jane Smith"
}

Tips for customizing: Add columns for shipment status or warehouse location. You can also have n8n trigger Slack messages to alert your staff for out-of-stock items.

5. (Optional) AI Touch: Personalized Content with GPT-4o

What’s happening: Want to wow your customers? Use n8n’s integration with GPT-4o to write personalized thank-you notes or product tips for each order, and insert them right into your PDF.

Workflow visual: Order Trigger → GPT-4o Generation → PDF Data Merge

{
  "note": "Hey Jane, thanks for your first order! If you have any questions about setting up your lamp, just reply to this email."
}

Tips for customizing: Train GPT-4o on your unique product line for more relevant suggestions. You can also generate promo codes or personalized recommendations!

Real Example: Workflow in Action

Let’s walk through a typical order. Imagine Jane buys a lamp from your Shopify store:

  1. Jane checks out on Shopify. Shopify instantly shoots the order JSON to n8n.
  2. n8n catches the webhook, pulls out Jane’s details, and passes them to pdforge.
  3. pdforge builds a professional, branded PDF confirmation/receipt.
  4. n8n grabs the PDF and attaches it to an email, which it sends out via Gmail to Jane within seconds.
  5. (Bonus) n8n records the sale in your inventory spreadsheet and pings GPT-4o for a unique thank you note.

Result: Jane gets a slick, personalized confirmation with all her order details in her inbox. You didn’t lift a finger.

Tools You’ll Need

  • Shopify (any plan with API/webhooks)
  • n8n (cloud or self-hosted for max flexibility)
  • PDF generator—try pdforge, PDF Generator API, or CraftMyPDF
  • Gmail account (or Google Workspace)
  • Google Sheets (optional, for inventory flows)
  • GPT-4o API access (optional, for AI personalization)

Related Articles

Final Thoughts

Setting up automated PDF order confirmations is one of those upgrades that makes your ecommerce shop run like magic. Your customers get quick, beautiful confirmations, your team gets their time back, and your brand looks just that little bit more polished. Once you’ve set up the basic workflow above, you can add extras (like tracking, AI content, or analytics) as your business grows. The key: start simple, automate the boring stuff, and focus on what you love about your business!

Share the Post:

Related Posts