n8n Tutorial

Automate Shipping Labels with n8n

AI detects gift orders and fragile items. Generate both packing slip and shipping label automatically. Send to warehouse in one workflow.

Vincent Ventalon
Vincent Ventalon
·Updated
TemplateFox

About the TemplateFox Node

The official TemplateFox community node for n8n lets you generate PDFs from templates with dynamic data. Works synchronously — returns the PDF URL immediately. Compatible with n8n AI Agents.

Why automate shipping?

New order comes in. You need a shipping label and a packing slip. But wait — customer added a note: "This is a gift, please don't include prices." Now you need the packing slip without prices. And one item is a glass vase, so you add fragile handling.

These edge cases multiply. An AI agent can read every order, detect gift messages, identify fragile items, and adjust the output accordingly. Both documents generate in parallel and land in the warehouse inbox.

Here's what we're building: order triggers workflow → AI analyzes order → generates packing slip + shipping label in parallel → sends to warehouse.

1

Set up templates

You'll need two templates:

Shipping Label

Sender/recipient addresses, tracking barcode, order ID, weight/dimensions, handling remarks.

Use this shipping label template →

Packing Slip

Line items with/without prices, customer note, gift message (if applicable), picking checkboxes.

Browse packing slip templates →

The shipping label template includes fields for sender/recipient, tracking barcode, weight, and handling remarks:

Shipping label template in the TemplateFox visual editor

The barcode component generates a Code 128 barcode from the {{ tracking_number }} field:

Barcode component properties showing tracking number variable

Tip: Create a "gift" variant of your packing slip that excludes prices. The AI routes gift orders to this template.

2

Build the workflow

ShopifyAI Agent
Packing SlipShipping Label
Email to Warehouse

2.1 — Order trigger

Add a Shopify Trigger (or WooCommerce, BigCommerce, webhook):

  • Event: orders/create or orders/paid
  • Includes: customer info, shipping address, line items, order notes

2.2 — AI order analysis

Add an AI Agent to analyze the order:

Analyze this e-commerce order:
{{ JSON.stringify($json) }}
Determine:
1. is_gift: true if gift message/note mentions gift
2. is_fragile: true if any item is glass/ceramic/electronic
3. handling_notes: special instructions for warehouse
Return: { "is_gift": bool, "is_fragile": bool, "handling_notes": "..." }

2.3 — Parallel PDF generation

Add two TemplateFox nodes in parallel (use n8n's parallel execution):

Packing Slip Node

  • • Route to "gift" template if is_gift
  • • Include/exclude prices based on gift status
  • • Add customer note to slip

Shipping Label Node

  • • Add "FRAGILE" to remarks if is_fragile
  • • Include handling notes from AI
  • • Generate tracking barcode

TemplateFox generates the PDF with your order data:

Generated shipping label preview with tracking barcode

2.4 — Send to warehouse

Add a Merge node to combine both PDFs, then Send Email or save to shared drive:

Result: Each order gets intelligent handling — gift orders get price-free slips, fragile items get special labels. Warehouse receives everything instantly.

Supported platforms

S
Shopify
W
WooCommerce
B
BigCommerce
M
Magento
E
Etsy
W
Webhook

Frequently asked questions

Which e-commerce platforms can trigger this workflow?

Any platform with webhooks or n8n integration: Shopify, WooCommerce, BigCommerce, Magento, Etsy. Custom stores work via webhook.

How does AI detect gift orders?

The AI agent analyzes order notes, gift message fields, and item names. "Gift wrap" in notes, a gift message present, or items like "gift box" all trigger gift order handling.

What special handling does AI add for fragile items?

The AI checks product categories and names for keywords (glass, ceramic, electronics). It adds handling instructions to the packing slip and can flag the label with "FRAGILE" remarks.

Can I generate both packing slip and label in one workflow?

Yes! Use two TemplateFox nodes in parallel after the AI analysis. Both receive the same enriched order data. The workflow merges outputs before sending to the warehouse.

How do I send documents to the warehouse?

Common options: email PDFs to warehouse@company.com, save to shared Google Drive folder, post to Slack channel, or send to a print server API.

What does this automation cost?

n8n self-hosted is free. TemplateFox offers 60 free PDFs per month. Two PDFs per order = 2 credits. View pricing.

Automate your PDF generation

Complete documentation, no-code integrations, and a powerful API to help you generate PDFs at scale. Let us handle the boring stuff.