Automation can be a great way to simplify your life.  With a tool like, you can set up a system to automatically parse data out of your emails and send it to your favorite online services.
Combine with Formstack Documents and you can automatically generate all kinds of documents from contracts, letters, invoices, and more.  You’ll never have to copy and paste again!

In this example, we’re going to show you how to automatically take data from an email we receive via and generate a contract that we’ll have signed through HelloSign.

To get started, we’re going to set up the template for our contract using a Word document.  Inside our Word document we’re going to add our boilerplate contract information and then for the spots that we want to insert our customer’s information, we’re going to use merge fields that look like {$Name}, {$Address}, etc.

Here’s what our contract template looks like:

Since we’ll be collecting a signature on our contract using HelloSign, we need to add a signature tag so that HelloSign knows where to place the signature in our document.  This signature tag is just like any other text in the document and looks like:  [sig|req|signer1]

Once you have finished your contract template, we need to upload it to Formstack Documents.  From the Documents page in Formstack Documents, click the New Document button and give it a name.  On the next step, pick Office Document and then select the file from your computer.

After you upload your template, you’re going to be taken to the Settings tab where you can change various settings like the type of file that is generated and the name of the file.  For this example, we’re going to generate a PDF and then include the name of our client in the contract.

Next, we’re going to set up the Delivery of our document so that it is automatically sent over to HelloSign for signature after it is generated.  From the Deliver tab, click the New Delivery button and then select HelloSign from the list.  After you enter your HelloSign API Key, you’ll need to choose the merge fields that hold the name and the email address of the signer.

Once we have the HelloSign delivery finished, we’re ready to set up the integration with!  To send data from to Formstack Documents, we’re going to use their Webhooks integration, so we need to grab the Merge URL for our document.

Under the Merge tab, you will find the Merge URL for your document.  This is a unique webhook endpoint that will use to send data to your contract template.  Go ahead and copy this URL for later.

Inside, you’ll need to set up your inbox for this process.  We’ll be processing emails from a lead generation form.  Once you have the Parsing Rules set up for your inbox, we need to set up the Webhook Integration to Formstack Documents.

From the Webhook Integrations page, choose Webhooks from the list.  Go ahead and give your webhook a name like “Send Contract” then choose JSON as the payload and enter your Merge URL in the Target URL box.

The other options, we’ll be sending an HTTP POST with a flat variable structure.

After you have finished the webhook, go ahead and save then it’s time to run a test!  Send a new email to your inbox and then that data will automatically be sent over to Formstack Documents where your contract will be generated and sent to HelloSign.

Here’s what our contract looked like ready to sign:

Congrats, you’re all done!  You can now automatically generate all kinds of documents from a simple email.  Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.