Generate a document from an automation and email or WhatsApp it
Add a Generate a document step to an automation: it prints the template for the record and saves it in a file field. The next steps then send it as an email attachment, as a file on WhatsApp, or as a link in a message.
Under Save it onto, choose the record: This record, The record a Find step found, or A record linked to it (up to 2 relations away, and the first record is used).
3
Under Template, choose the template.
4
Under Save it into, choose the file field. Under Files already in the field, choose Keep them or Replace them.
5
Under Call it, give the document a short name in English letters that the next steps use, such as “Invoice”.
6
Optional: type a File name, and turn on Also set the template’s status if the template moves the status on save.
7
Under Only when these are filled in, the fields the template prints are ticked for you: untick any it can do without, and choose what happens If one is empty.
8
After it, add Send an email with the document attached, or Send a WhatsApp message with the document as a file.
Try it with Practice run: messages reach only you, and the document step doesn’t print a PDF.
Settings
Setting
What it does
Template
Must print the target record’s unit
Call it
English letters and numbers, starting with a letter: “Invoice” is saved as invoice. Up to 30 characters, and it can’t repeat in the automation
File name
Empty = the record’s title. .pdf is added automatically
Keep them / Replace them
Replacing leaves only the new document in the field
Also set the template’s status
Applies the status setting in the template. If the status is refused, the document is still saved and a warning shows in the log
Only when these are filled in
If any of them is empty, the document isn’t generated
If one is empty
Stop here on this path (it doesn’t count as a failure), or Carry on without a document
Using the document in the next steps
Variable
Value
{{document.invoice.url}}
The PDF link, valid for 7 days from when the step that sends it runs
{{document.invoice.name}}
The file name, with .pdf
{{document.invoice.size}}
The size in bytes
In Send an email, add the document as an attachment, or attach every file in a file field. In Send a WhatsApp message, choose to attach the document as a file, or put the link in the text.
Who prints
The document prints with the permissions of the automation’s creator: it contains only what they could download themselves. If they lose the permission to read the unit, the step fails.
A ready-made template
In the automation templates gallery: “Send the invoice on WhatsApp and by email when the deal is won”. It needs an invoice template and a file field in the deals unit.
If something goes wrong
What you see
Why
What to do
“Template not found”
The template was deleted.
Choose another template.
“The template prints another unit”
The template doesn’t match the target record’s unit.
Choose a template on the same unit.
“The field isn’t a file field”
The field was deleted, or its type changed.
Choose a file field.
“Skipped — there was nothing to do for this record.” in the run’s History
A field under Only when these are filled in was empty. The run still ends Done, and nobody is notified.
Fill in the field, or change If one is empty. A Practice run on that record names the empty fields.
“The automation’s creator doesn’t have permission”
The creator lost the permission for the unit, or left.