🎉  WebMerge is now Formstack Documents! Learn More   🎉

Close
July 06, 2017

Automatically Populate Applications from MySQL Databases

Saving information in a MySQL database is a great way to keep track of a lot of data, but it’s not a very user-friendly way to view the data.  With a tool like WebMerge you can instantly populate templates with data from your database and send off to customers or internal departments.

In this example, we’re going to show you how to automatically populate an application form with data from our MySQL database.  We’ll then automatically email the application to our review team.

To get started, we’re going to setup the template for our application using a Fillable PDF.  This is a PDF with fields that can be filled in with information (like many government forms).  We’re going to use a PDF editor like Nitro to edit the PDF and add the fields we’re going to populate from the database.

Here’s what our application template looks like:
 


Once you have the template finished, we need to upload it to WebMerge.  From the Documents page in WebMerge, click the New Document button and enter a name.  On the next step, pick Fillable PDF as the document type and then pick the file from your computer.
 


After you have uploaded your template to WebMerge, you’ll be taken to the Settings tab where you can modify various settings like the type of file that is generated and the name of the file.  For this example, we’re going to output a PDF and include the name of our applicant in the file name.
 


Next, we’re going to setup the delivery of our document so that it is automatically emailed directly to our review team.  Under the Deliver tab, we’re going to Edit the default email delivery.  For the To address, we’re going to enter our review team’s email address, then customize any of the other email settings.
 


Once we have our email delivery updated, we’re done with the setup process in WebMerge and we’re ready to integrate with our MySQL database.  To help with the integration, we’re going to use our friends over at Zapier.

Inside Zapier, we’re going to setup a New Zap.  For the Trigger, we’re going to choose MySQL as the app then New Row as the trigger.
 


Once you authenticate your MySQL database, you’ll have to select the table that you want to monitor.  Follow those steps and continue.

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


Once you authenticate your WebMerge account, Zapier is going to load a list of all the documents you have setup in your account.  Go ahead and pick the Application that you just setup and Zapier will load a list of the merge fields in your template.

For each merge field, you need to pick the corresponding field from your MySQL database.  This tells Zapier how to send the database information over to WebMerge so that it is populated in the correct spot on your template.
 


Once you have matched up all of your merge fields, go ahead and save you Zap and turn it on.  We’re ready for a test!  Open up your database and add a new row to your table.  Zapier will detect this new row and automatically send the data over to WebMerge and your application will be generated.

Here’s what our merged application looked like:
 


Congrats, you’re all done!  You can now automatically generate all kinds of documents from your MySQL data.  Can you think of any other ways you could use WebMerge to simplify your paperwork process?
 

6 min read

Ready to give Formstack Documents a try?
Start your Free Trial now!

×

Create Applications from MySQL Now

By signing up here, you agree to our Terms of Use