How to integrate with Make
Make is a powerful, no-code automation platform that enables any user to automate routine workflows with an easy-to-use visual builder and drag-and-drop functionality. Use Make to connect PDF Generator API with more than 850 apps or any API to generate PDF documents from your software, data, or any other application.
PDF Generator API allows you easily create personalised document templates and generate PDF documents by merging the templates with your data. Using Make and PDF Generator API together, you can build scenarios to get data from one software platform, create documents, and then save, email or do anything else with your new documents. For example, you could save or email a new certificate whenever someone completes a Typeform questionnaire.
Make has also created its official tutorial for PDF Generator API, which you can find here.
To use PDF Generator API with Make, you need a PDF Generator API account. You can create a free Sandbox Account and use it for one month to evaluate and integrate the API. The Sandbox Account allows you to make 2500 merges per month.
The monthly usage (merges) is calculated based on the number of document generation requests multiplied by the number of unique datasets in the request. Read more here
To get started building your automation, login, or create a free Make account, and click on "Create a new scenario."
Adding a Module
To add a new PDF Generator API module to your scenario, select "Add module" and search for "PDF Generator API." Make provides two actions:
"Generate document" to generate an output,
and "Make an API call" to make any other API calls found in our documentation.
Creating a new Connection
To create a new Connection, you need to add API Key, API Secret, and Workspace identifier values. You can find your PDF Generator API key and secret from the Account Settings view. The Workspace identifier specifies the request context. Your default Workspace identifier is the email you used to sign up to PDF Generator API.
At the moment, Make provides two actions that you can use in your scenario:
"Make API call"
This action allows you to send dynamic data from other applications to generate a PDF document using a template you created in PDF Generator API. The action returns a data set where response is the URL to file, or base64 encoded PDF content.
Template ID (required)
Select a template from the drop-down or use a mapped value.
Document name (optional)
The file name can be a static text or a dynamic value from your application (e.g. database or form input).
You have the option to return a public URL to a document or a base64 encoded PDF document. You can use the URL to quickly show the PDF document to your end-user without the need to save it in your scenario. The base64 encoded document can be converted to binary format using toBinary([content];base64) function when needed.
Data (JSON string or URL) (required)
The JSON data is used to replace placeholders in your template. You can add static JSON or use mapped values from previous steps of the scenario.
The generated URL is available for 30 days
Make API call
This action allows you to perform an arbitrary authorised API call to PDF Generator API. You can find our API documentation here.
API endpoint path relative to https://us1.pdfgeneratorapi.com/api/v3.
Add custom headers if needed. You don't have to add authorisation headers; they are added automatically.
Query string (optional)
Add query parameters if needed.
Request body (raw JSON string).
Tricks and tips
Convert base64 to a binary file
Document generation action can return a base64 encoded document or a URL to the document. However, sometimes your scenario module action requires a binary file for upload (e.g. Google Drive). In such a case, you can easily convert a base64 encoded string to a binary file using the toBinary() function.
Use dynamic values in JSON
You can use dynamic (mappable) values from other modules within the JSON string.
Updated on: 14/08/2023