n8n
Generate PDFs from an n8n workflow, on n8n Cloud or on your own server.
The Mizanpage node for n8n generates a PDF from a published template and the data of your workflow. It works on n8n Cloud as well as on a self-hosted n8n.
Installing the node
- In n8n, open Settings › Community nodes.
- Click Install, enter
n8n-nodes-mizanpageand confirm. - The Mizanpage node and the Mizanpage Trigger appear in the node list.
Connecting
Create a Mizanpage API credential and paste an API key into it. A test key (mzp_test_…) makes free watermarked PDFs while you build the workflow. Choose the PDF only permission so that a stolen key cannot change anything in your workspace. See API keys.
Generating a PDF
Add the Mizanpage node with the Generate PDF operation:
- Template: the list shows your published templates.
- Data: the fields the template prints are listed. Drag the values of the previous nodes into them. A table expects a JSON list of rows, for example
[{"designation": "Tyre", "prix": "€89.00"}]. - Options: the reference (it also names the file), the language of a translated template and an idempotency key. With the same key, a workflow that runs again does not count the same PDF twice.
The PDF comes out in the binary property data, ready for a Gmail, Google Drive or Outlook node. The Get Published Templates operation lists the published templates.
Each PDF is a counted document. To try without being counted, use a test key.
Reacting when a PDF is ready
The Mizanpage Trigger starts the workflow when an asynchronous render (POST /v1/renders) has finished or failed. When the workflow is activated it creates the webhook in Mizanpage itself, and removes it when the workflow is deactivated. It checks the signature of every call and downloads the ready PDF. See Webhooks.
n8n needs a public address
Mizanpage only sends webhooks to a public HTTPS address. An n8n running on your own computer needs a tunnel or a domain name to receive the trigger. The Mizanpage node works everywhere.