How to generate PDFs from Notion via automation (Make)
There may be data in Notion that can be used to automatically populate a contract or other document types, replacing the need for manual creation. For example, think about using Notion as a CRM (customer relationship management) platform and automating the contract creation for client projects. Or a team-wide project management system where everyone can easily submit information via a Notion form to generate PDFs/Google Docs and have the file automatically generated and added to Notion.
Automating document generation can save time, increase accuracy, and remove the cognitive load needed for team members to switch platforms to generate contracts or other templatized documents across various software tools. Such cognitive load and switching often make people avoid the task, which clearly creates knots and roadblocks in the system and your business. So, making the process more frictionless and automating it can have significant positive incremental impacts on your business.
If you prefer using an out-of-the-box service for this use case, some good options are Documint and DocsAutomator.
In this essay, I'm showing you how you can automate document generation (PDFs/Google Docs/Word) from Notion via an automation (using Make, but any other automation software works). For this implementation, the requirements are:
A Google Drive account
A Notion workspace (Plus plan or higher) — use this link for 3 months free on the Business Plan if you're a startup
How It Works
Watch the video for a visual explanation.
Since Notion is a flexible tool, the use cases are varied. In this demo, the workflow involves:
Submitting a Notion form to generate documents. Using a form as a way to input the document's data is a familiar and accessible way that's suitable for many contexts, and that's why I'm using this example. You can use different methods of entering the data (e.g., by direct page creation in the data source, a manual button that triggers a webhook, and more).
The automation ingests the data, creates the document, and appends it back into Notion for easy access. This process normally takes less than a minute.
Diagram of the workflow to generate files
How to Set Up
Here are the steps to automate document generation from Notion using Google Drive via Make:
If you don’t already have one, create a data source in Notion that contains the data you need and a Form view. You can duplicate the data source used in the video here.
In Google Drive, create Google Docs templates — as many as needed for your use cases. Maybe you have multiple template types, and you want to handle them via automation. This is possible by adding a dedicated "Document type" property in Notion and including conditional logic in the Make automation to process each document type accordingly. On each Google Doc template, add double curly brackets around each variable (i.e., the values that will be replaced dynamically by the data in Notion).
Create the Make scenario (automation). The trigger of the scenario is a webhook. You will paste the webhook URL in the Notion data source automation explained in the next point. A webhook is an instant trigger that will begin each time there is a new document creation form submitted in Notion.
After the webhook, the “Get a data source item” module retrieves the Notion page properties (to use in subsequent steps for document generation).
The Google Docs "create document from template" generates the document. Once you connect your Google account within this module, you can select the document template you created in step #2 above. If the document contains variables (text enclosed in double curly brackets as mentioned earlier), they will be automatically detected as fields in the module, and you can map Notion properties from the previous module into each variable.
If you use multiple document types and multiple templates, you can employ a Router in the Make scenario to split out the automation into multiple branches, each one filtered by the contract type and using the dedicated Google Docs template.
The Google Drive “download document” takes the generated Google Doc ID as the input, and turns it into a PDF that will be uploaded into a dedicated Notion property.
(Optional) HTTP request to the Notion API to create a file upload. This step uploads the PDF file to Notion for permanent storage and easy attachment to the dedicated File property in the Notion data source. I published a detailed essay and video about the Notion Files upload API, which you can find here. If you prefer storing the PDF file in Google Drive and just linking to it in Notion, you can skip this module and use a URL property in Notion instead of a File property.
Update a Notion data source item. In this last module, you will update the document request Notion page to upload/link to the PDF and Google Docs files, which will be easily accessible by everyone in the team on the Notion page of the document request, alongside other properties such as the document status, owner, and anything else that may aid your internal workflows for document management.
Add a data source automation in Notion (trigger the webhook). Last, add a data source automation in the Notion data source used to request documents. This automation has one trigger and one action. The trigger is “page created” (assuming you only create pages via the form with all the necessary properties for document generation populated. If not, you can customize the trigger based on your requirements). The action is “Send webhook”, where the webhook URL is the Make webhook URL available in the dedicated module that triggers the scenario (as explained at the beginning of this section).
FAQs
Do I need a paid Notion plan for this?
Yes, you need Notion Plus or higher to use database automations and webhooks.
Can I use a different automation platform instead of Make?
Yes, any automation platform that supports webhooks and Google Drive integration (like Zapier, n8n) will work.
Can I generate multiple document types from the same form?
Yes, add a "Document type" property in Notion and use conditional logic in the Notion Form. Plus, use a Router with filters on each branch in Make to process each type with its corresponding template.
Do I need coding knowledge?
No - you'll need familiarity with setting up automations in Notion, Make, and an understanding of how to structure variables in Google Docs templates.