Create Excel and PDF documents from Typeform in Power Automate
This article demonstrates how to create PDF documents from an XLSX template on a Typeform submission with the help of Processes in Power Automate (MS Flow). It may help you to automize the generation of different documents like applications, requests, orders, etc., in your company.
Processes are a Plumsail Documents feature with an intuitive interface for creating documents from templates.
Typeform is an online form builder that allows you to create modern responsive forms for your website.
Let’s see how to connect them in Power Automate (Microsoft Flow) to automatically collect data from a Typeform, apply the data to our Excel template, and generate a new PDF document.
Create a Form
We’ve already created a Typeform with a short employee questionnaire. We will use data from its submission. If you haven’t created Typeforms before, follow this link to learn how to do it.
Below is a screenshot of our form:
Configure the process
Before creating the Flow, we need to create a process, which will generate PDF documents from an XLSX template.
Create a new process
Open Processes in your Plumsail account and click Add process.
Then, select Uploaded file in the side panel to import your Excel template. You can use your own template or download the sample template from this example.
Enter a name for the process, select PDF as the output format, and choose the templating engine. Finally, click Create
Configure a template
After creating the process, the template opens in the online editor.
The template used in this example looks like this:
Templating syntax
When creating your own templates, mind the templating language. Plumsail Excel XLSX templates use a different approach than most other templating solutions. It uses a minimal amount of syntax to make your work done.
Template placeholders are enclosed in {{ }} brackets, and when the document is generated, these placeholders are replaced with data pass to the process.
Read this article to get familiar with the templating engine.
Test template
Before building the automation flow, test the template to verify that it generates the expected document.
Click Test template and the editor will automatically generate a test form, based on the placeholders found in the template.
You can adjust the look of the testing form by changing token types. Alternately, you can use a JSON example.
Verify that the generated document looks correct before continuing.
Settings
Use the Settings option to further customize your process.
You can:
Name your template
Change the output filename dynamically
Select the output file type
After updating the settings, run another test to verify the output. When everything is configured correctly, click Save.
Start the Process
We will start our Process from Power Automate (Microsoft Flow).
Create a Flow
This is how our Flow looks:
Check out the Flow steps described below.
Form is submitted
We need to start the Flow every time somebody submits our Typeform. For that, search for Typeform in Power Automate and set Typeform - When a response is submitted as a trigger.
If this is your first Flow with Typeform, on this step, sign in to your Typeform Account from MS Flow to use your forms inside Flows.
Then, you’ll need to pick the form you want to track in the dropdown.
Start document generation process
This is the action from Plumsail Documents connector. This action is suitable for starting the Process of generating documents from a template. You can find more information about this action by visiting this page.
Using the action for the first time, you’ll be asked for ‘’Connection Name’’ and ‘’Access Key’’.
You can type any name for the connection. For example, ‘’Plumsail Documents’’.
Then create an API key in your Plumsail Account page, copy and paste it to ‘’Access Key’’ field.
The action has two parameters:
Process name. Select the process you need from available ones.
Template data. Specify source data in JSON format:
This object contains information from our form. We selected the dynamic content from the output of Typeform - When a response is submitted action:
Use the ready document in Flow
You can stop on the step Start document generation process.
Steps described above are enough for generating PDFs from an XSLX template based on the Typeform submission. Your result file will be saved to OneDrive in this case. See how it will look:
But if you need an advanced logic, it’s possible to work with the result file right in the Flow.
Here is an example of how you can send the ready document for approval.
Add an action Create an approval from the Approvals connector. Select an output of the previous step for an attachment.
Sign up for Plumsail Documents
As you can see, it’s simple to automize the generation of documents on Typeforms submission. If you’re new to Plumsail Documents, register an account and follow the steps described in the article to set the process for automatic creation of PDFs from Typeforms. A 30-day trial is free.