Zapier
The Typefold app for Zapier renders your published templates from any Zap, and starts a Zap when a render finishes.
Before you start
Section titled “Before you start”- A Zapier account.
- An API key with
render:create,render:readandtemplate:read, pluswebhook:managefor the Render Finished trigger. - A published template with sample data; see Build a template.
Connect Typefold
Section titled “Connect Typefold”- Open the Typefold invite link and accept the invite. The app is in beta, so it is not listed in Zapier’s app directory yet.
- In a Zap, add a Typefold step and select Sign in.
- Paste the API key.
- Leave Server address empty for
app.typefold.dev. On a self-hosted installation, enter the address you open Studio at, such ashttps://pdf.example.com. Zapier must be able to reach it from the internet.
What the app does
Section titled “What the app does”| Step | What it does |
|---|---|
| Render Report (action) | Renders a template as PDF, Excel or an image of one page (PNG, JPEG or WebP) with the Reports API and returns the File for the next steps, such as an email attachment. |
| Start Render (action) | Starts a PDF render with the Renders API. A render that finishes within 10 seconds comes back with its File; otherwise use the trigger. |
| Find Render (search) | Finds a render by its Render ID, with its File once it has succeeded. |
| Render Finished (trigger) | Starts the Zap when a render succeeds, fails or is cancelled, as picked under Events. Its File is ready to use in the next steps. |
Render Report and Start Render can make a free Test render, with a “TEST” watermark on every page; see test renders.
Both can also draw a Watermark of your own, such as COPY, across every page of a PDF or image;
see watermarks. For an image, Render Report takes the Image
page and Image width (px), and File name names the file.
To fill the template’s content fields with one of its content sets, such as a customer’s, enter the set’s name under Content set. Left empty, the template’s own content is used.
Start Render can also upload the PDF to one of your
storage destinations: enter its name under Storage destination,
and optionally a Storage path such as invoices/{renderId}.pdf.
With Keep a copy in Typefold off, the step and the trigger have no file to pass on.
Fill in the template’s data
Section titled “Fill in the template’s data”After you pick a Template, its data appears as fields, read from the published version’s sample data. Map a value from an earlier step into each field you need:
- Fields such as
customer › nameset one value. - Line items, such as
lines, take one row per item. Map a line-item field from an earlier step, such as an order’s products, to send the whole list. - Data (JSON) takes the data as a JSON object, for anything the fields do not cover. Fields you fill in replace the same values in it.
If you change a template’s sample data, publish it again, then select Refresh fields in the Zap.
Render Finished
Section titled “Render Finished”Turning on a Zap with Render Finished registers a webhook endpoint for
it in your workspace, described as Zapier (Zap …) with the Zap’s ID, and turning the Zap off
removes it. Each Zap with the trigger uses one of your workspace’s 10 endpoints.
Every render in the workspace that ends in a picked state starts the Zap, including Studio previews and renders from your own application and other Zaps. To react only to renders from Start Render, add a Zapier filter that Template version ID exists. Without it, a Zap that renders again after Render Finished starts itself on every run.