Skip to main content
Shopify Flow is Shopify’s automation app. Foliant adds its own triggers and actions to Flow, so you can build workflows such as “when an order is paid and the customer is tagged Wholesale, email the invoice to their accounts team”, or “when a Peppol invoice fails, notify me”. You don’t connect Flow in Settings › Integrations. Install Shopify Flow from the Shopify App Store, then find Foliant’s triggers and actions when you build a workflow.

Foliant’s actions

Both actions need a workflow trigger that has an order, such as Order paid. Without an order, the action fails with “The workflow gave no order.”

Email order document

Before you use this action, set up the email in Foliant:
  1. In Foliant, go to Delivery and add an email for the template, or open an existing one.
  2. In When, set Send when to A Shopify Flow workflow sends it.
  3. Copy the Template ID with Copy ID. It stays the same when you rename the template.
Then in Shopify Flow:
  1. Create a workflow and choose a trigger, such as Order paid. Add any conditions.
  2. Add the Foliant action Email order document.
  3. Paste the ID into Template ID.
  4. Optional: in Send to, enter an email address to send to instead of the email’s usual recipients, for example an accounts payable contact.
  5. Turn on the workflow.
If no active Foliant email for Shopify Flow uses that template ID, the action fails and Flow shows how to fix it. Emails need a plan that includes PDF delivery emails. See Send PDFs from Shopify Flow.

Send invoice to Peppol

Add Send invoice to Peppol after a trigger with an order. Foliant sends the e-invoice the same way as when an order is paid: only for business orders, and once per order. An invoice that was already sent counts as a success. If Peppol isn’t set up, the action fails with “Peppol isn’t set up for this store.” See Send Peppol e-invoices.

Foliant’s triggers

You can use the Template ID from Document emailed in a later Email order document action, for example to send a second document after the first one.

Good to know

  • Document emailed only starts for orders, not draft orders.
  • To stop workflows from starting themselves over and over, an email sent by a Flow workflow starts Document emailed only once per order and email.
  • Peppol invoice failed starts once for each different failure. If retries fail the same way, the workflow doesn’t start again. It doesn’t start for orders that aren’t business orders or were already sent.