Articles on: React Flow

Generate PDF documents in a workflow

Generate PDF documents in a workflow


In this article:


With the Create PDF document action, a workflow can turn order, product or customer data into a PDF file: an invoice, a packing slip, a gift certificate or a product spec sheet. You can save the file in Shopify or Google Drive and attach it to an email in the same workflow.


What the Create PDF document action does


You design the document in a text editor and insert variables, such as {{order.name}} or {{product.title}}. Each time the workflow runs, React Flow fills in the real values and creates a PDF file. You'll find the action under Action > External > Create PDF document.


Create a PDF


  1. In a workflow, click +, select Action and choose Create PDF document.
  2. In File name, enter the name of the file. You can use variables, for example invoice-{{order.name}}.
  3. In File content, write the document. Use the editor toolbar for headings, tables and formatting, or click <> to edit the HTML directly. Click Add variables to insert store data, and Preview to check the result.
  4. Under Select storage, choose where to save the file (see below).
  5. Click Save.




If a file with the same name already exists in the storage, the name is changed automatically so that each file stays unique.


Where the PDF is saved


  • Shopify: the file is saved in your Shopify Files (Content > Files). The content can be up to 20 MB.
  • Google Drive: the file is saved in Google Drive. Select your Google connection under Select connector. The content can be up to 25 MB. See Google Drive connector: save workflow files to Google Drive.
  • No storage: "Files won't be saved remotely, but can still be used in this workflow." Choose this if you only need to send the PDF in an email.


After the action runs, the run details show the file name, storage type and Created document URL.


Attach the PDF to an email


  1. Add a Send email action after Create PDF document.
  2. Fill in the email fields as usual.
  3. Select the Attachments checkbox and click Add files.




  1. In the Select file window, open the Workflow tab. It lists the files that earlier steps of this workflow create. Select your PDF and click Done.




The Shopify and Google Drive tabs let you attach files that already exist in your storage, for example your terms and conditions.


Example: send an invoice PDF for every new order


  1. Trigger: Order created.
  2. Action: Create PDF document.
    • File name: invoice-{{order.name}}
    • File content: your invoice layout with variables such as {{order.name}}, {{order.totalPriceSet.shopMoney.amount}} and {{order.currencyCode}}. To list the products, use a Liquid loop:

{% for line_item in order.lineItems %}{{line_item.name}} × {{line_item.quantity}}<br>{% endfor %}

  • Select storage: Shopify
  1. Action: Send email to {{order.email}}, with the PDF attached from the Workflow tab.
  2. Click Run Test > Execute to try it on a real order, then Turn on the workflow.


Limits and tips


  • Keep the content under 20 MB for Shopify storage or 25 MB for Google Drive. Large images increase the size quickly, so use compressed images.
  • Use Preview in File content to check the layout before you save.
  • Use Run Test > Simulate to check the logic without creating files or sending emails. Use Execute to create a real PDF.
  • The default React Flow email has a limit of 500 emails per day. For reliable delivery and no daily limit, connect your own SMTP or Microsoft account.


✔️ Next step


Check our articles to learn more about the app's functionality:


Updated on: 20/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!