Skip to content

This how-to is for builders who want a document to go out on its own: when a purchase request is approved, email the supplier the purchase order as a PDF; when a certificate is issued, send it to its holder. Nobody opens the record or selects an export.

It takes two reactions. The first generates the file. The second starts when the file is ready and emails it.

You need:

  • Developer access on the module, to add templates and reactions.
  • An export template for the document. See Export templates.
flowchart LR
  A["Request approved"] --> B["Reaction 1: Generate File<br/>(Download Template on)"]
  B --> C["File ready"]
  C --> D["Reaction 2: Export File by template"]
  D --> E["Send Email<br/>with the file attached"]

The Generate File action does not save the file on the record. It announces that the file is ready, and the second reaction picks it up from there.

Step 1: Prepare a template for the automation

Section titled “Step 1: Prepare a template for the automation”
  1. On the entity — for example Purchase requests — open the Templates tab and add a template. See Add the template to the entity.
  2. Set Level to Single Entry and Type to Pdf, and upload a Word (.docx) or HTML file. The Type decides the file you get: only Pdf gives a PDF; a Word template gives a Word document.
  3. Give it a name that marks its purpose, such as Purchase order (email), and save.

Use a template of its own for the automation, and do not tick it in any view. The second reaction runs whenever a file is made from this template — including when someone exports with it from a view — so a template shared with people would send emails each time they export.

The template does not have to be offered in a view for the automation to use it.

  1. On Purchase requests, add a reaction with the event that should produce the document — for example On Workflow Step Reached on the Approved step. See Add a reaction.

  2. Add the action Generate File.

  3. In Template, choose Purchase order (email).

  4. Leave Download Template on. It is what tells the second reaction that the file is ready.

  5. Choose the file name. Pick a type, then a value:

    • Fixed — a name you type in File Name, such as Purchase order.

    • Field — a text field of the record, such as Request number.

    • Expression — a name worked out from the record, for example:

      'PO-' + scope.entry.value.request_no

    Without a name, the file takes the template’s name.

  6. Save.

The person whose action set off the reaction also gets an in-app notification, Your file is ready to download.

  1. On the same entity, add a second reaction with the event Export File by template.
  2. In Template, choose Purchase order (email).
  3. Add the action Send Email: the recipients in To, then a Subject and a body. To put values from the request in them, use placeholders — see Insert record values into messages. The request’s own fields are offered Since 1.8.
  4. Turn on Attachment. In the attachment row, choose Field, then the File field — the file the first reaction made.
  5. Save.

Example. Subject: Purchase order {{po_no}}, with po_no mapped to the Request number field; To: the supplier’s email field; Attachment: Field › File.

  1. Approve a test purchase request.
  2. You receive the Your file is ready to download notification, and the supplier receives the email with the PDF attached.
  3. If the email does not arrive, open each reaction’s run history: the first should show the file, the second the email. See Check that it ran.
ProblemWhat to check
The second reaction never runsDownload Template is off in Generate File, the second reaction chooses another template or none, or it is on a different entity.
The attachment is a Word file, not a PDFThe template’s Type is Word. Set it to Pdf.
The supplier gets an email every time someone exportsThe template is also offered in a view. Keep a separate template for the automation.
The PDF is not producedThe service that converts documents to PDF is not running in your installation. Ask your administrator.
The template’s condition is ignoredGenerate File does not check a template’s export condition. Put the condition in the first reaction’s filter.
The email has no attachmentIn the attachment row, the type is not Field, or another file field is chosen instead of File.

Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27