Blog

Automatically Populate PDF and Word Documents from a MySQL Database

Blog

Automatically Populate PDF and Word Documents from a MySQL Database

Blog

Automatically Populate PDF and Word Documents from a MySQL Database

Blog

Automatically Populate PDF and Word Documents from a MySQL Database

Blog

Automatically Populate PDF and Word Documents from a MySQL Database

Download PDFDownload PDF
Blog

Automatically Populate PDF and Word Documents from a MySQL Database

Formstack
/
June 20, 2016
Blog

Automatically Populate PDF and Word Documents from a MySQL Database

MIN
/
June 20, 2016
About the Episode
Episode Highlights
Meet our Guest
Episode Transcript

Building internal database systems can be a great way to organize your organizations data. With a tool like MySQL, you can build flexible databases that integrate across your entire organization and can scale as your business grows.

With Formstack Documents you can easily integrate your MySQL databases to automatically generate all types of documents - such as contracts, invoices, reports, and more. In this example, we’re going to show you how to automatically generate an invoice when we add a new order to our database and email it to our customer.

To get started, we’re going to setup the template for our invoice in Formstack Documents. From the Documents page in Formstack Documents, click the New Document button and enter a name. On the next step, pick Build Your Own document type and continue.


On the next step, you’ll be taken to the Document Builder. Here’s where you are going to build your template. You can add your logo, contact information, and other boilerplate invoice info. Then for the spots that you want to insert the invoice data, you’re going to use merge fields that look like {$Name}, {$Address}, {$Description}, etc.

Here's what our invoice template looks like:


Once you have your template finished, go ahead and save and then move on to the Settings tab. Here, you can modify various options 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 we’re going to include the order number in the file name.


Next, we’re going to setup the email delivery so that our invoice is automatically emailed to our customer. From the Deliver tab, go ahead and Edit the default email delivery. For the To address, we’re going to use a merge field (ie something like {$Email}). Feel free to change any of the other email settings.


After we’re finished up our email delivery, we are done with the setup process in Formstack Documents and we’re ready to setup the integration with our MySQL database. To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, go ahead and create a New Zap. For the Trigger, we’re going to choose MySQL as the service and then New Row as the trigger.


After you authenticate your MySQL database, you’ll need to choose which table you want to monitor. Go ahead and pick your order table.

Next, we’re going to setup the Action of our Zap. For the service, we’re going to choose Formstack Documents and then Create Document Merge as the action.


After you authenticate your Formstack Documents account, Zapier will load a list of the documents in your Formstack Documents account. Go ahead and pick the invoice template that you just setup. Once you pick the document, Zapier is going to load a list of all the merge fields in your document.

For each of the merge fields in your document, you’ll need to match up the corresponding columns from your MySQL table. This tells Zapier how to send your data over to Formstack Documents so that it is populated in the correct spot in your template.


After you have matched up all of your merge fields, go ahead and save your Zap and turn it on. We’re ready for a test! Add a new row to your MySQL table and Zapier will detect the new row then send that data over to Formstack Documents. Formstack Documents will generate the invoice and email it to you.

Here’s what our merged invoice looked like:


Congrats, you’re all finished! You can now automatically generate all kinds of documents with data from your MySQL databases. Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Blog

Automatically Populate PDF and Word Documents from a MySQL Database

Blog

Automatically Populate PDF and Word Documents from a MySQL Database

Get the Report

Not a valid e-mail address

Great, thank ya!

You can now access the content.
Oops! Something went wrong while submitting the form.
Blog

Automatically Populate PDF and Word Documents from a MySQL Database

Panelists
No items found.
Introduction
Introduction

Great, thank ya!

You can now access the content.
Download NowDownload Now
Oops! Something went wrong while submitting the form.

Building internal database systems can be a great way to organize your organizations data. With a tool like MySQL, you can build flexible databases that integrate across your entire organization and can scale as your business grows.

With Formstack Documents you can easily integrate your MySQL databases to automatically generate all types of documents - such as contracts, invoices, reports, and more. In this example, we’re going to show you how to automatically generate an invoice when we add a new order to our database and email it to our customer.

To get started, we’re going to setup the template for our invoice in Formstack Documents. From the Documents page in Formstack Documents, click the New Document button and enter a name. On the next step, pick Build Your Own document type and continue.


On the next step, you’ll be taken to the Document Builder. Here’s where you are going to build your template. You can add your logo, contact information, and other boilerplate invoice info. Then for the spots that you want to insert the invoice data, you’re going to use merge fields that look like {$Name}, {$Address}, {$Description}, etc.

Here's what our invoice template looks like:


Once you have your template finished, go ahead and save and then move on to the Settings tab. Here, you can modify various options 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 we’re going to include the order number in the file name.


Next, we’re going to setup the email delivery so that our invoice is automatically emailed to our customer. From the Deliver tab, go ahead and Edit the default email delivery. For the To address, we’re going to use a merge field (ie something like {$Email}). Feel free to change any of the other email settings.


After we’re finished up our email delivery, we are done with the setup process in Formstack Documents and we’re ready to setup the integration with our MySQL database. To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, go ahead and create a New Zap. For the Trigger, we’re going to choose MySQL as the service and then New Row as the trigger.


After you authenticate your MySQL database, you’ll need to choose which table you want to monitor. Go ahead and pick your order table.

Next, we’re going to setup the Action of our Zap. For the service, we’re going to choose Formstack Documents and then Create Document Merge as the action.


After you authenticate your Formstack Documents account, Zapier will load a list of the documents in your Formstack Documents account. Go ahead and pick the invoice template that you just setup. Once you pick the document, Zapier is going to load a list of all the merge fields in your document.

For each of the merge fields in your document, you’ll need to match up the corresponding columns from your MySQL table. This tells Zapier how to send your data over to Formstack Documents so that it is populated in the correct spot in your template.


After you have matched up all of your merge fields, go ahead and save your Zap and turn it on. We’re ready for a test! Add a new row to your MySQL table and Zapier will detect the new row then send that data over to Formstack Documents. Formstack Documents will generate the invoice and email it to you.

Here’s what our merged invoice looked like:


Congrats, you’re all finished! You can now automatically generate all kinds of documents with data from your MySQL databases. Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Panelists
No items found.
Infographic

Automatically Populate PDF and Word Documents from a MySQL Database

Follow this tutorial to start automatically populating PDF and Word Documents from a MySQL database.
Download InfographicDownload Infographic

Building internal database systems can be a great way to organize your organizations data. With a tool like MySQL, you can build flexible databases that integrate across your entire organization and can scale as your business grows.

With Formstack Documents you can easily integrate your MySQL databases to automatically generate all types of documents - such as contracts, invoices, reports, and more. In this example, we’re going to show you how to automatically generate an invoice when we add a new order to our database and email it to our customer.

To get started, we’re going to setup the template for our invoice in Formstack Documents. From the Documents page in Formstack Documents, click the New Document button and enter a name. On the next step, pick Build Your Own document type and continue.


On the next step, you’ll be taken to the Document Builder. Here’s where you are going to build your template. You can add your logo, contact information, and other boilerplate invoice info. Then for the spots that you want to insert the invoice data, you’re going to use merge fields that look like {$Name}, {$Address}, {$Description}, etc.

Here's what our invoice template looks like:


Once you have your template finished, go ahead and save and then move on to the Settings tab. Here, you can modify various options 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 we’re going to include the order number in the file name.


Next, we’re going to setup the email delivery so that our invoice is automatically emailed to our customer. From the Deliver tab, go ahead and Edit the default email delivery. For the To address, we’re going to use a merge field (ie something like {$Email}). Feel free to change any of the other email settings.


After we’re finished up our email delivery, we are done with the setup process in Formstack Documents and we’re ready to setup the integration with our MySQL database. To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, go ahead and create a New Zap. For the Trigger, we’re going to choose MySQL as the service and then New Row as the trigger.


After you authenticate your MySQL database, you’ll need to choose which table you want to monitor. Go ahead and pick your order table.

Next, we’re going to setup the Action of our Zap. For the service, we’re going to choose Formstack Documents and then Create Document Merge as the action.


After you authenticate your Formstack Documents account, Zapier will load a list of the documents in your Formstack Documents account. Go ahead and pick the invoice template that you just setup. Once you pick the document, Zapier is going to load a list of all the merge fields in your document.

For each of the merge fields in your document, you’ll need to match up the corresponding columns from your MySQL table. This tells Zapier how to send your data over to Formstack Documents so that it is populated in the correct spot in your template.


After you have matched up all of your merge fields, go ahead and save your Zap and turn it on. We’re ready for a test! Add a new row to your MySQL table and Zapier will detect the new row then send that data over to Formstack Documents. Formstack Documents will generate the invoice and email it to you.

Here’s what our merged invoice looked like:


Congrats, you’re all finished! You can now automatically generate all kinds of documents with data from your MySQL databases. Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Building internal database systems can be a great way to organize your organizations data. With a tool like MySQL, you can build flexible databases that integrate across your entire organization and can scale as your business grows.

With Formstack Documents you can easily integrate your MySQL databases to automatically generate all types of documents - such as contracts, invoices, reports, and more. In this example, we’re going to show you how to automatically generate an invoice when we add a new order to our database and email it to our customer.

To get started, we’re going to setup the template for our invoice in Formstack Documents. From the Documents page in Formstack Documents, click the New Document button and enter a name. On the next step, pick Build Your Own document type and continue.


On the next step, you’ll be taken to the Document Builder. Here’s where you are going to build your template. You can add your logo, contact information, and other boilerplate invoice info. Then for the spots that you want to insert the invoice data, you’re going to use merge fields that look like {$Name}, {$Address}, {$Description}, etc.

Here's what our invoice template looks like:


Once you have your template finished, go ahead and save and then move on to the Settings tab. Here, you can modify various options 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 we’re going to include the order number in the file name.


Next, we’re going to setup the email delivery so that our invoice is automatically emailed to our customer. From the Deliver tab, go ahead and Edit the default email delivery. For the To address, we’re going to use a merge field (ie something like {$Email}). Feel free to change any of the other email settings.


After we’re finished up our email delivery, we are done with the setup process in Formstack Documents and we’re ready to setup the integration with our MySQL database. To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, go ahead and create a New Zap. For the Trigger, we’re going to choose MySQL as the service and then New Row as the trigger.


After you authenticate your MySQL database, you’ll need to choose which table you want to monitor. Go ahead and pick your order table.

Next, we’re going to setup the Action of our Zap. For the service, we’re going to choose Formstack Documents and then Create Document Merge as the action.


After you authenticate your Formstack Documents account, Zapier will load a list of the documents in your Formstack Documents account. Go ahead and pick the invoice template that you just setup. Once you pick the document, Zapier is going to load a list of all the merge fields in your document.

For each of the merge fields in your document, you’ll need to match up the corresponding columns from your MySQL table. This tells Zapier how to send your data over to Formstack Documents so that it is populated in the correct spot in your template.


After you have matched up all of your merge fields, go ahead and save your Zap and turn it on. We’re ready for a test! Add a new row to your MySQL table and Zapier will detect the new row then send that data over to Formstack Documents. Formstack Documents will generate the invoice and email it to you.

Here’s what our merged invoice looked like:


Congrats, you’re all finished! You can now automatically generate all kinds of documents with data from your MySQL databases. Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Collecting payments with online forms is easy, but first, you have to choose the right payment gateway. Browse the providers in our gateway credit card processing comparison chart to find the best option for your business. Then sign up for Formstack Forms, customize your payment forms, and start collecting profits in minutes.

Online Payment Gateway Comparison Chart

NOTE: These amounts reflect the monthly subscription for the payment provider. Formstack does not charge a fee to integrate with any of our payment partners.

FEATURES
Authorize.Net
Bambora
Chargify
First Data
PayPal
PayPal Pro
PayPal Payflow
Stripe
WePay
Monthly Fees
$25
$25
$149+
Contact First Data
$0
$25
$0-$25
$0
$0
Transaction Fees
$2.9% + 30¢
$2.9% + 30¢
N/A
Contact First Data
$2.9% + 30¢
$2.9% + 30¢
10¢
$2.9% + 30¢
$2.9% + 30¢
Countries
5
8
Based on payment gateway
50+
203
3
4
25
USA
Currencies
11
2
23
140
25
23
25
135+
1
Card Types
6
13
Based on payment gateway
5
9
9
5
6
4
Limits
None
None
Based on payment gateway
None
$10,000
None
None
None
None
Form Payments
Recurring Billing
Mobile Payments
PSD2 Compliant

Building internal database systems can be a great way to organize your organizations data. With a tool like MySQL, you can build flexible databases that integrate across your entire organization and can scale as your business grows.

With Formstack Documents you can easily integrate your MySQL databases to automatically generate all types of documents - such as contracts, invoices, reports, and more. In this example, we’re going to show you how to automatically generate an invoice when we add a new order to our database and email it to our customer.

To get started, we’re going to setup the template for our invoice in Formstack Documents. From the Documents page in Formstack Documents, click the New Document button and enter a name. On the next step, pick Build Your Own document type and continue.


On the next step, you’ll be taken to the Document Builder. Here’s where you are going to build your template. You can add your logo, contact information, and other boilerplate invoice info. Then for the spots that you want to insert the invoice data, you’re going to use merge fields that look like {$Name}, {$Address}, {$Description}, etc.

Here's what our invoice template looks like:


Once you have your template finished, go ahead and save and then move on to the Settings tab. Here, you can modify various options 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 we’re going to include the order number in the file name.


Next, we’re going to setup the email delivery so that our invoice is automatically emailed to our customer. From the Deliver tab, go ahead and Edit the default email delivery. For the To address, we’re going to use a merge field (ie something like {$Email}). Feel free to change any of the other email settings.


After we’re finished up our email delivery, we are done with the setup process in Formstack Documents and we’re ready to setup the integration with our MySQL database. To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, go ahead and create a New Zap. For the Trigger, we’re going to choose MySQL as the service and then New Row as the trigger.


After you authenticate your MySQL database, you’ll need to choose which table you want to monitor. Go ahead and pick your order table.

Next, we’re going to setup the Action of our Zap. For the service, we’re going to choose Formstack Documents and then Create Document Merge as the action.


After you authenticate your Formstack Documents account, Zapier will load a list of the documents in your Formstack Documents account. Go ahead and pick the invoice template that you just setup. Once you pick the document, Zapier is going to load a list of all the merge fields in your document.

For each of the merge fields in your document, you’ll need to match up the corresponding columns from your MySQL table. This tells Zapier how to send your data over to Formstack Documents so that it is populated in the correct spot in your template.


After you have matched up all of your merge fields, go ahead and save your Zap and turn it on. We’re ready for a test! Add a new row to your MySQL table and Zapier will detect the new row then send that data over to Formstack Documents. Formstack Documents will generate the invoice and email it to you.

Here’s what our merged invoice looked like:


Congrats, you’re all finished! You can now automatically generate all kinds of documents with data from your MySQL databases. Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Building internal database systems can be a great way to organize your organizations data. With a tool like MySQL, you can build flexible databases that integrate across your entire organization and can scale as your business grows.

With Formstack Documents you can easily integrate your MySQL databases to automatically generate all types of documents - such as contracts, invoices, reports, and more. In this example, we’re going to show you how to automatically generate an invoice when we add a new order to our database and email it to our customer.

To get started, we’re going to setup the template for our invoice in Formstack Documents. From the Documents page in Formstack Documents, click the New Document button and enter a name. On the next step, pick Build Your Own document type and continue.


On the next step, you’ll be taken to the Document Builder. Here’s where you are going to build your template. You can add your logo, contact information, and other boilerplate invoice info. Then for the spots that you want to insert the invoice data, you’re going to use merge fields that look like {$Name}, {$Address}, {$Description}, etc.

Here's what our invoice template looks like:


Once you have your template finished, go ahead and save and then move on to the Settings tab. Here, you can modify various options 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 we’re going to include the order number in the file name.


Next, we’re going to setup the email delivery so that our invoice is automatically emailed to our customer. From the Deliver tab, go ahead and Edit the default email delivery. For the To address, we’re going to use a merge field (ie something like {$Email}). Feel free to change any of the other email settings.


After we’re finished up our email delivery, we are done with the setup process in Formstack Documents and we’re ready to setup the integration with our MySQL database. To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, go ahead and create a New Zap. For the Trigger, we’re going to choose MySQL as the service and then New Row as the trigger.


After you authenticate your MySQL database, you’ll need to choose which table you want to monitor. Go ahead and pick your order table.

Next, we’re going to setup the Action of our Zap. For the service, we’re going to choose Formstack Documents and then Create Document Merge as the action.


After you authenticate your Formstack Documents account, Zapier will load a list of the documents in your Formstack Documents account. Go ahead and pick the invoice template that you just setup. Once you pick the document, Zapier is going to load a list of all the merge fields in your document.

For each of the merge fields in your document, you’ll need to match up the corresponding columns from your MySQL table. This tells Zapier how to send your data over to Formstack Documents so that it is populated in the correct spot in your template.


After you have matched up all of your merge fields, go ahead and save your Zap and turn it on. We’re ready for a test! Add a new row to your MySQL table and Zapier will detect the new row then send that data over to Formstack Documents. Formstack Documents will generate the invoice and email it to you.

Here’s what our merged invoice looked like:


Congrats, you’re all finished! You can now automatically generate all kinds of documents with data from your MySQL databases. Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Building internal database systems can be a great way to organize your organizations data. With a tool like MySQL, you can build flexible databases that integrate across your entire organization and can scale as your business grows.

With Formstack Documents you can easily integrate your MySQL databases to automatically generate all types of documents - such as contracts, invoices, reports, and more. In this example, we’re going to show you how to automatically generate an invoice when we add a new order to our database and email it to our customer.

To get started, we’re going to setup the template for our invoice in Formstack Documents. From the Documents page in Formstack Documents, click the New Document button and enter a name. On the next step, pick Build Your Own document type and continue.


On the next step, you’ll be taken to the Document Builder. Here’s where you are going to build your template. You can add your logo, contact information, and other boilerplate invoice info. Then for the spots that you want to insert the invoice data, you’re going to use merge fields that look like {$Name}, {$Address}, {$Description}, etc.

Here's what our invoice template looks like:


Once you have your template finished, go ahead and save and then move on to the Settings tab. Here, you can modify various options 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 we’re going to include the order number in the file name.


Next, we’re going to setup the email delivery so that our invoice is automatically emailed to our customer. From the Deliver tab, go ahead and Edit the default email delivery. For the To address, we’re going to use a merge field (ie something like {$Email}). Feel free to change any of the other email settings.


After we’re finished up our email delivery, we are done with the setup process in Formstack Documents and we’re ready to setup the integration with our MySQL database. To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, go ahead and create a New Zap. For the Trigger, we’re going to choose MySQL as the service and then New Row as the trigger.


After you authenticate your MySQL database, you’ll need to choose which table you want to monitor. Go ahead and pick your order table.

Next, we’re going to setup the Action of our Zap. For the service, we’re going to choose Formstack Documents and then Create Document Merge as the action.


After you authenticate your Formstack Documents account, Zapier will load a list of the documents in your Formstack Documents account. Go ahead and pick the invoice template that you just setup. Once you pick the document, Zapier is going to load a list of all the merge fields in your document.

For each of the merge fields in your document, you’ll need to match up the corresponding columns from your MySQL table. This tells Zapier how to send your data over to Formstack Documents so that it is populated in the correct spot in your template.


After you have matched up all of your merge fields, go ahead and save your Zap and turn it on. We’re ready for a test! Add a new row to your MySQL table and Zapier will detect the new row then send that data over to Formstack Documents. Formstack Documents will generate the invoice and email it to you.

Here’s what our merged invoice looked like:


Congrats, you’re all finished! You can now automatically generate all kinds of documents with data from your MySQL databases. Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Building internal database systems can be a great way to organize your organizations data. With a tool like MySQL, you can build flexible databases that integrate across your entire organization and can scale as your business grows.

With Formstack Documents you can easily integrate your MySQL databases to automatically generate all types of documents - such as contracts, invoices, reports, and more. In this example, we’re going to show you how to automatically generate an invoice when we add a new order to our database and email it to our customer.

To get started, we’re going to setup the template for our invoice in Formstack Documents. From the Documents page in Formstack Documents, click the New Document button and enter a name. On the next step, pick Build Your Own document type and continue.


On the next step, you’ll be taken to the Document Builder. Here’s where you are going to build your template. You can add your logo, contact information, and other boilerplate invoice info. Then for the spots that you want to insert the invoice data, you’re going to use merge fields that look like {$Name}, {$Address}, {$Description}, etc.

Here's what our invoice template looks like:


Once you have your template finished, go ahead and save and then move on to the Settings tab. Here, you can modify various options 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 we’re going to include the order number in the file name.


Next, we’re going to setup the email delivery so that our invoice is automatically emailed to our customer. From the Deliver tab, go ahead and Edit the default email delivery. For the To address, we’re going to use a merge field (ie something like {$Email}). Feel free to change any of the other email settings.


After we’re finished up our email delivery, we are done with the setup process in Formstack Documents and we’re ready to setup the integration with our MySQL database. To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, go ahead and create a New Zap. For the Trigger, we’re going to choose MySQL as the service and then New Row as the trigger.


After you authenticate your MySQL database, you’ll need to choose which table you want to monitor. Go ahead and pick your order table.

Next, we’re going to setup the Action of our Zap. For the service, we’re going to choose Formstack Documents and then Create Document Merge as the action.


After you authenticate your Formstack Documents account, Zapier will load a list of the documents in your Formstack Documents account. Go ahead and pick the invoice template that you just setup. Once you pick the document, Zapier is going to load a list of all the merge fields in your document.

For each of the merge fields in your document, you’ll need to match up the corresponding columns from your MySQL table. This tells Zapier how to send your data over to Formstack Documents so that it is populated in the correct spot in your template.


After you have matched up all of your merge fields, go ahead and save your Zap and turn it on. We’re ready for a test! Add a new row to your MySQL table and Zapier will detect the new row then send that data over to Formstack Documents. Formstack Documents will generate the invoice and email it to you.

Here’s what our merged invoice looked like:


Congrats, you’re all finished! You can now automatically generate all kinds of documents with data from your MySQL databases. Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Building internal database systems can be a great way to organize your organizations data. With a tool like MySQL, you can build flexible databases that integrate across your entire organization and can scale as your business grows.

With Formstack Documents you can easily integrate your MySQL databases to automatically generate all types of documents - such as contracts, invoices, reports, and more. In this example, we’re going to show you how to automatically generate an invoice when we add a new order to our database and email it to our customer.

To get started, we’re going to setup the template for our invoice in Formstack Documents. From the Documents page in Formstack Documents, click the New Document button and enter a name. On the next step, pick Build Your Own document type and continue.


On the next step, you’ll be taken to the Document Builder. Here’s where you are going to build your template. You can add your logo, contact information, and other boilerplate invoice info. Then for the spots that you want to insert the invoice data, you’re going to use merge fields that look like {$Name}, {$Address}, {$Description}, etc.

Here's what our invoice template looks like:


Once you have your template finished, go ahead and save and then move on to the Settings tab. Here, you can modify various options 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 we’re going to include the order number in the file name.


Next, we’re going to setup the email delivery so that our invoice is automatically emailed to our customer. From the Deliver tab, go ahead and Edit the default email delivery. For the To address, we’re going to use a merge field (ie something like {$Email}). Feel free to change any of the other email settings.


After we’re finished up our email delivery, we are done with the setup process in Formstack Documents and we’re ready to setup the integration with our MySQL database. To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, go ahead and create a New Zap. For the Trigger, we’re going to choose MySQL as the service and then New Row as the trigger.


After you authenticate your MySQL database, you’ll need to choose which table you want to monitor. Go ahead and pick your order table.

Next, we’re going to setup the Action of our Zap. For the service, we’re going to choose Formstack Documents and then Create Document Merge as the action.


After you authenticate your Formstack Documents account, Zapier will load a list of the documents in your Formstack Documents account. Go ahead and pick the invoice template that you just setup. Once you pick the document, Zapier is going to load a list of all the merge fields in your document.

For each of the merge fields in your document, you’ll need to match up the corresponding columns from your MySQL table. This tells Zapier how to send your data over to Formstack Documents so that it is populated in the correct spot in your template.


After you have matched up all of your merge fields, go ahead and save your Zap and turn it on. We’re ready for a test! Add a new row to your MySQL table and Zapier will detect the new row then send that data over to Formstack Documents. Formstack Documents will generate the invoice and email it to you.

Here’s what our merged invoice looked like:


Congrats, you’re all finished! You can now automatically generate all kinds of documents with data from your MySQL databases. Can you think of any other ways that you can use Formstack Documents to simplify your paperwork process?

Formstack
Formstack is a SaaS company with a mission to help organizations digitize what matters, automate workflows, and fix processes—all without code. A variety of team members come together to compile posts under Formstack's authorship.
More Articles
Meet The Host
Content Marketing Manager
Connect
Lindsay is a writer with a background in journalism and loves getting to flex her interview skills as host of Practically Genius. She manages Formstack's blog and long-form reports, like the 2022 State of Digital Maturity: Advancing Workflow Automation.