Automatically generate documents from template and send to Xodo Sign for e-signing
In this example, we’ll create a sales contract from a Word template, convert it to PDF, and send it to Xodo Sign for electronic signing using Plumsail Documents Processes.
Here’s an example of the signed contract:
To follow this guide, you’ll need a Plumsail account. If you don’t have one yet, sign up for a 30-day free trial.
Create process
First, navigate to the Processes section in your Plumsail account. Click Add Process and select the option to start from a ready-made template.
Find and select the Sales of goods contract template.
Next, enter a name for your process, select PDF as the Output file type, and click Create to continue.
Configure template
Once the process is created, you’ll see a preview of the selected template.
Click Edit online to customize it in the online editor, or upload a different template file if needed.
Templating syntax
You may notice {{tokens}} throughout the sales contract template. These are placeholders used to insert dynamic data into the document.
The templating engine recognizes expressions enclosed in {{curly braces}} and replaces them with the corresponding data when generating a document.
Our sales contract template includes a table with product details. Tokens such as {{products.name}} and {{products.quantity}} refer to properties of objects in the products collection. The engine automatically generates a table row for each product.
The template also uses functions to format currency values, such as {{products.price|format(C, en-US)}}, and calculate the total cost using {{totalCost=products|sum(cost)}}.
For more details on tokens, formatting, and calculations, see the Word templating documentation.
Test document template
To preview the generated contract, click Test template. A dialog will open with an automatically generated testing form based on the tokens in your Word template.
Fill in the fields with sample data to check the result. You can also test the template using JSON data or customize the testing form by changing token types.
Once you’re satisfied with the result, click Save to continue.
Configure settings
After testing the sales contract template, you can adjust the process and template settings. Click the gear icons to open the corresponding settings:
Process settings control how the process runs. Here you can configure:
Process mode. By default, new processes are in Testing mode. Documents generated in this mode have a Plumsail watermark, but executions are free. Switch to Production mode to generate documents without the testing watermark.
Timezone and locale. Define how dates, times, and numbers are formatted.
Output files. If your process contains multiple templates, you can choose how the generated documents are combined: keep them as separate files, merge them into a single PDF, or package them into a ZIP archive.
Template settings control the generated document. Here you can configure:
Template name. Set a name to identify the template within the process.
Output filename. Customize the generated file name using tokens from the template.
Output file type. Choose the format of the generated document. In this example, we’ll select PDF to send the contract to Xodo Sign.
Template engine. Select the Modern or Classic engine depending on the syntax used in your DOCX template. Modern is selected by default.
Conditionally run template. Set conditions to generate the document only when specific criteria are met.
When PDF is selected as the output type, you can also configure additional options, such as adding a watermark or protecting the document with a password.
Send document to Xodo Sign for signing
Next, configure the delivery to send generated contracts to Xodo Sign for electronic signing.
In the Delivery step, select Xodo Sign from the available options.
Connect your Xodo Sign account to Plumsail Documents.
Once connected, configure the delivery settings:
Business. Select the Xodo Sign business account to use.
Email subject and message. Specify the email subject and body that recipients will receive. You can use tokens from the document template to personalize them.
Recipients. Add the recipients and assign their roles: Needs to sign or Receives a copy. In our example, we have two recipients who need to sign the contract.
Signer PINs. Optionally, click the lock icon next to a recipient to set a PIN for additional security.
Expand Advanced to configure additional options. In our example, we’ll enable:
Sequential signing. Recipients must sign the document in the specified order. You can change the order by dragging and dropping recipients.
Require all signers to sign. The document is completed only after all required signatures are collected. If a signer declines, the document is canceled.
You can also configure document expiration, reminder notifications, and Sandbox mode for testing.
The Files to deliver setting lets you choose which generated files to send when your process uses multiple templates.
Your Xodo Sign delivery is now configured. You can add multiple deliveries to the same process if needed, such as saving a copy of the generated contract to SharePoint or OneDrive. See the full list of available deliveries for more options.
Start process to generate documents and send them for signing
Your process is now ready. Click Run process to see the available options for starting the process.
In this example, we’ll use a Plumsail Web Form. Each form submission will trigger the process, populate the sales contract template with the submitted data, and send the generated PDF to Xodo Sign for signing.
Here’s what our web form looks like:
You can download the ready-made form. To download the JSON file, right-click the link and select Save Link As….
Next, go to Forms in your Plumsail account and click Create form to open the Plumsail Forms designer. There, import the downloaded JSON file:
Save the form, and it’s ready to use. You can also customize it to suit your needs. For more details, see the documentation on how to design web forms.
Bind web form to process
Now, connect the web form to your Documents process.
Click Run process and select Web Form. An automatically generated form will open. Click the back arrow in the upper-left corner to return to the form management menu.
In the dialog, click Bind existing form and select your form from the list of available Plumsail Forms and click Bind.
Once the form is bound, each submission will automatically start the process. Plumsail Documents will populate the Word template with the submitted data, generate a PDF contract, and send it to Xodo Sign for electronic signing.
Integrate with your services
You can also trigger the document generation process from other services using integration platforms such as Zapier and Power Automate.
For example, you can automate contract generation and signing using data from:
Explore more possibilities in the integrations section.
If you have any questions or need assistance, contact us at support@plumsail.com.