Create Word and PDF documents from Gravity Forms in Zapier
This article explains how to create Word DOCX documents from a template based on data from a Gravity Forms submission using Processes and Zapier.
Processes are a Plumsail Documents feature for generating documents from templates.
Gravity Forms is a WordPress plugin that allows you to create forms with a drag-and-drop creation tool.
We will connect Processes and Gravity Forms in Zapier to automatically collect data from a Gravity Forms form, apply the data to our template, and generate a new Word DOCX document. You can also generate PDF documents by changing the output file type to PDF in the template settings.
Create a Form
We created a simple form for collecting submissions. This article will guide you through your first steps with Gravity Forms if you have never worked with it before.
Below is a screenshot of our form:
Configure the Process
Once our form is ready, we will also need to create a Process, which we will later connect to Zapier.
Use a pre-built template
Plumsail Documents offers dozens of templates to generate documents from.
For this example, we will use the Plumsail sales invoice template — it contains the fields needed for this example.
We will need to create a new process. To do that, go to the Processes section in your Plumsail account, click Add process, and select Pick a premade template:
You will be redirected to the library of document templates. We select the sales invoice template for our scenario:
Name the process and click Create to proceed. The template editor opens.
Configure the template
In the template editor, you can adjust the document template to your needs. Everything in the curly brackets will be replaced with Gravity Forms data dynamically. You can add more placeholders. Tokens support tables, charts, conditional content, and other template features. Learn how Plumsail Documents Word DOCX templates work here.
This template uses the Plumsail logo as a placeholder. Click Edit online to change the logo and customize the template:
Additionally, you can change process and template settings. In this example, we check the following parameters.
Process mode
It is Testing by default. It means you will not be charged for this process’ runs, but result documents will have a Plumsail watermark. Change it to Production to remove the watermark.
Template name
We named the template Sales invoice according to the document type.
Hint
You can add multiple templates to the same process if you need several types of documents generated from the same input.
Output filename
Use tokens to include submission data in the output filename. They work the same way as in the template. For instance, we will use the following tokens to define the output file name: {{number}} and {{customerCompany}}. Once the document is generated, we will receive a sales invoice with the name Invoice #3956 - Bear Paw Solutions (depending on the value of the tokens).
Output file type
By default, it is the same as your template’s format. In this particular case, it is DOCX. You can change it to PDF to generate PDF invoices from the Word template.
Hint
You can protect your final PDF document with a watermark, by setting a password, or disabling some actions.
Once you have customized all the settings, you can test the template to see the result.
When everything is done here, click Save and move to setting up deliveries.
Delivery
In this example, the generated document is saved to OneDrive. However, you can choose another delivery method.
Select the folder where the output document will be saved.
Start the Process
We will start our Process from Zapier.
Create a Zap
Zap is an automated connection between web services in Zapier. Below is a step-by-step explanation of how to create it from scratch.
You can also use a pre-built Zap template. Click Use this Zap, and follow the steps described further in this article.
This is how our Zap looks:
Form Submission in Gravity Forms
We need our Zap to start every time somebody submits the form. Search for Gravity Forms in Zapier and set the Event to Form Submission:
Note
For help connecting Gravity Forms to Zapier, see Zapier’s connection guide.
Sign in to your Gravity Forms account if this is your first Zap with Gravity Forms. Once you are done with that, proceed to the Set up trigger step and select your form here:
Set the Use Admin Field Labels to the value that suits you. Learn more about Admin Labels in Gravity Forms.
Finally, click Continue and test your trigger to see if it is working well.
Start process in Plumsail Documents
Once the trigger is set, search for Plumsail Documents and set the event to Start Process:
Likewise, if this is your first Zap with Plumsail Documents, sign in to your Plumsail Account from Zapier. Alternatively, if you have an existing Plumsail account linked to the app, you can add another one and use that one instead.
Set up action
Select the process you want to start with this Zap from the dropdown. You will see fields to fill out — they have the same names as the tokens from the template.
To fill them out, use the results of the Gravity Forms trigger.
The Zap is configured. When it runs, it generates an invoice like the one shown below:
Sign up for Plumsail Documents
The configured Zap generates a document for each Gravity Forms submission. If you are new to Plumsail Documents, sign up to get a free 30-day trial.
Hint
Use Plumsail Documents zap templates to start document generation processes. All available zap templates are presented on this page.