Create PDF is an action that builds a PDF file from a layout you write and saves the file in a variable (the trigger decides when the automation runs, and the action decides what happens). It's meant to help you produce documents like invoices or reports without opening a template by hand.
You can use this action for many things, including:
Creating an invoice PDF when an installation is marked as completed.
Putting the open tasks of a project into a status report.
Note:
The PDF isn't stored on a record by itself. The file lives in a variable for this run. Use it in a later action, for example as an attachment in
Send email.Page settings are hidden at first. Select
Show moreto see the layout: orientation, page size, and margins.
Who can use the Create PDF action?
Automations are available on all plans: Free, Plus, and Premium. The number of automation actions per month depends on your plan. See the limits for your plan on our pricing page.
To add or change this action, you need to be a
Workspace adminof the workspace the app is in. App permissions alone aren't enough.
Add the Create PDF action
To create a PDF from an automation:
Open the database app on desktop or web and click the automations icon in the top bar (tooltip
Create and view automations).Open an automation, or select
New automationand choose a trigger.Select
Add action→Create PDF. The step appears asCreate a PDF and save file in PDF.Enter a name in
File name. The empty box showsUntitled.pdf, andType '@' for variablesonce you click into it.Write the content of the PDF in the text editor. Select
Show moreto set the page layout.Select
Show previewto check the result.Select
Create automationfor a new automation, orSave changesfor an existing one.
Create PDF settings
File name and the content are always visible:
File name: the name of the file. You can mix text with record values, for example "Invoice " followed by theInvoice numberfield. If the name doesn't end in.pdf, Tape adds.pdffor you. Characters like/,:, or?are replaced with a dash. If the name is empty, the file is calledUntitled.pdf.The content: the body of the PDF. See Content below.
Select Show more to see the layout settings. Next to Layout, three dropdowns set the orientation, the page size, and the margins. The settings appear in this order:
PortraitorLandscape: the page orientation. Open the dropdown to switch.Page size: open the dropdown and choose one of these (sizes shown here in inches):
Letter(8.5″ x 11″)Tabloid(11″ x 17″)Legal(8.5″ x 14″)A3(11.69″ x 16.54″)A4(8.27″ x 11.69″)A5(5.83″ x 8.27″)Envelope #10(4.12″ x 9.5″)Custom formatlets you enter your own size. EnterWidthandHeightnext toFormat.Margins: open the dropdown and choose
Normal margins,Narrow margins,Moderate margins,Wide margins, orCustom margins. WithCustom margins, you enterTop,Right,Bottom, andLeftnext toMargins, plusHeaderandFooterwhen a header and footer are turned on.Units: page sizes, custom sizes, and margins are shown in centimeters or inches, depending on
Measurement systeminSettings→Preferences. Learn more about preferences → Values from variables are read as millimeters.Page number: appears when page numbers are turned on. See Header, footer, and page numbers below.
A new action starts with Portrait and Normal margins. The page size is Letter, or A4 if your Tape language is German. Select Show less to hide the settings again.
Content
The content is the body of the PDF. It's visible without Show more. The empty editor shows Body. When a header and footer are turned on, you can hide or show the body with Hide body and Show body. Type @ to insert record values.
For more formatting, open the editor in fullscreen with
Open in fullscreen(cmd/ctrl+enter). There you find the menusFile,Edit,View,Insert,Format, andTable, and a toolbar with font, font size, and text styles.In fullscreen, use
Insertto add images, links, buttons, and tables.To edit the HTML, open the editor in fullscreen and select
File→Source code. The PDF is rendered like a web page in Chrome, so inline styles, style blocks, tables, colors, font sizes, flexbox, and images from a web address all work.Long content flows onto new pages automatically.
Header, footer, and page numbers
Open the action's menu ••• and turn on Header and footer or Page numbers under Settings.
With
Header and footer, you write a header and a footer. ChooseSame across entire PDF, orDifferent first pageto write one for theFirst pageand one for theOther pages. UseShow headerorHide headerandShow footerorHide footerto show or hide the editors.With
Page numbers, setFormatandStart atunderPage number. Page numbers can use numbers (1, 2, 3), numbers with a leading zero (01, 02), letters (a, b, c or A, B, C), or Roman numerals. Type@and selectPage numberorPage countunderPDFto insert them, for example in the footer.
Preview the PDF
Select Show preview to see the PDF with your layout. The preview has two controls:
Exit previewcloses the preview.Simulate variableslets you choose a record. Tape runs a simulation up to this action and fills the preview with that record's values, without changing any data.
Hover over the buttons to see their shortcuts. Show preview has the tooltip Show preview and simulate variables (option/alt + P), and Simulate variables has Start simulate variables (option/alt + S). In the editor, Open preview in new tab opens the preview in a new browser tab.
Use the PDF in later actions
The action saves the file in a variable named PDF. Later actions can use it:
In
Send email, openAttach fileand select thePDFvariable. It's listed with the file fields.To store it on a record, add
Update record, add the file field, chooseAdd files, and select thePDFvariable.In
Send HTTP request, you can insert the PDF's file URL into the request. The file itself isn't sent as an upload.
Let's look at an example
Let's say your solar installation team wants to send the customer an invoice when an installation is completed. Here's how:
Set the trigger to
When a record is updatedand select theStatusfield.Add the filter
WhereStatusHas changed to"Completed".Select
Add action→Create PDF.In
File name, enter "Invoice " followed by theInstallation numberfield, then ".pdf".Select
Show moreand chooseA4. Write the invoice in the content: the customer's name, the address, and theTotalfield.Select
Show previewto check the layout.Select
Add action→Send email, send it to the customer, and attach the PDF.Select
Create automation.
The next time an installation is completed, the customer gets an email with the invoice PDF attached.
Create PDF errors
If the preview is empty, the content has no text yet, or a record value has no data. Select
Simulate variablesto check.If the step fails, the run shows the step and its message. Open the automation and click
▷next toManual run(tooltipView all runs), or presscmd/ctrl+1. Each run shows its status, for exampleSuccess; select a run to see every step. For all automations, openRunsin the Automation Center and filter byApp,Automation, orStatus. A successful step shows the name of the created file.If a PDF takes too long to create, the step fails. A very long PDF or one with many large images can take too long. Split the content, or use smaller images.
If special characters look wrong, check the content in the preview.
Test, pause, or edit the Create PDF action
Manual runruns the automation once. Next toRun on, choose the records, then selectStart run. If you have unsaved changes, the button readsSave and start run. Any email you send with the PDF goes to real recipients.To stop only this action, click
•••next to it and turn onDeactivate.To change the PDF, open the automation, select the step, make your changes, then select
Save changes.
Learn more
FAQs
Can I choose the page size and orientation?
Can I choose the page size and orientation?
Yes! Select Show more, then open the dropdowns for orientation, page size, and margins. You can choose from Letter, Tabloid, Legal, A3, A4, A5, Envelope #10, or Custom format.
Can I add a header, footer, or page numbers?
Can I add a header, footer, or page numbers?
Yes. Open the action's menu ••• and turn on Header and footer or Page numbers under Settings. Then type @ to insert Page number or Page count.
Can I put a table of records in the PDF?
Can I put a table of records in the PDF?
Yes. Collect the records, loop through them to build an HTML table in a variable, then use the variable in the content. Learn more about building an HTML table →
Can I add images?
Can I add images?
Yes! Open the editor in fullscreen, select Insert → Image, and enter the image's web address.
Can I attach the PDF to the record?
Can I attach the PDF to the record?
Yes. Add Update record, choose the file field, select Add files, and pick the PDF variable.
Are there other actions I can use?
Are there other actions I can use?
Yes! Actions can create and update records, add comments, send emails, create PDFs, call other services, and more. See every action in Automation actions →
Are you a developer using the Tape API for automations?
Are you a developer using the Tape API for automations?
The automation API has its own documentation for developers. Full reference: create_pdf in the developer docs →
Still have questions? Find answers and get help from community experts in the Tape community →
