Example workflows
Shopify Flow workflows that generate a PDF: email the invoice link when an order is paid, send a packing slip to the warehouse, and a customer summary.
Three workflows you can build in a few minutes. Each one uses the Generate document action and passes its download link to the next step. For the action itself, see Set up the Generate document action in Shopify Flow.
Email the invoice link when an order is paid
- Trigger: Order paid.
- Action: Generate document, with Template name set to Invoice and Language set to the order's customer locale.
- Action: an email action that sends to the customer. Shopify Flow's own Send internal email only reaches your staff, so sending to the customer needs an email app that adds an action to Flow, for example our Workflow Transactional Email.
In the body of the email, insert the url and, if you like, the filename of the Generate document step from Flow's variable picker. A body could read:
Hello,
thank you for your order. Your invoice is ready to download:
[the url of the Generate document step]
The link is valid for 7 days.Mention the 7 days in the email, so a customer who opens it later knows to ask for a new link.
Send a packing slip to the warehouse
- Trigger: Order created.
- Condition (optional): only orders that need shipping, or only orders from one location.
- Action: Generate document, with Template name set to Packing slip. Leave Language empty, or enter the language of your warehouse team, for example en.
- Action: Send internal email to your warehouse address, with the
urlof the Generate document step in the body.
Because the language is fixed here, every packing slip is in the language your team reads, whatever the customer's language is.
A customer summary for your sales team
- Trigger: a customer trigger, for example Customer created, or a trigger of your own choice that has a customer.
- Action: Generate document, with Template name set to Customer summary.
- Action: Send internal email, or a request to your CRM, with the
url.
The Customer summary template renders a customer, so the workflow must have one. An order trigger does not fill the customer field of the action by itself.
Good to know
- One action, one document. To send an invoice and a packing slip for the same order, add the action twice with different template names.
- The template name must match exactly. If a workflow fails with No template named ..., compare the name in the action with the name on the template's Settings tab.
- Each generated document counts toward your plan. A workflow that runs for every order generates one document per order. See Plans and pricing.
- Test with a real trigger. Turn the workflow on and trigger it once, then check Documents in the app.
Next steps
- Templates in several languages - send each customer the document in their language.
- Document history and downloads - see what your workflows generated.
- Troubleshooting - when a workflow step fails.
