Mail Merge in the Cloud with Google APIs

MAY 20, 2010
This post is part of the Who's @ Google I/O, a series of blog posts that give a closer look at developers who'll be speaking or demoing at Google I/O. This guest post is written by Jonathan Howard, lead developer of Drawloop Technologies and one of the creators of DDPs for Google Apps, a cloud based document automation service. DDPs for Google Apps will be demoing as part of the Developer Sandbox.

One of the first comments we received upon releasing our dynamic document packages (DDPs) for Google Apps was the lack of mail merge anywhere in the cloud. A DDP combines one or more documents together while also merging data into those documents, giving you a combined file with whatever page order you'd like. What we were missing from this was a simple way of getting multiple sets of data into this DDP quickly and easily. The business need was clearly there, and wasn't being filled. Google Apps provides not only an excellent document management system, but also a set of great APIs that can be utilized by third parties to expand upon the already robust offerings within Google Docs. Never ones to back down from a challenge, we set out to determine the requirements for a cloud-based mail merge solution.

1. Nothing local. Like any cloud-based solution, the only thing that should be required from a user is a solid internet connection. Their interactions shouldn't rely on installing software or using a machine with a specific set up. Our experiences from implementing DDPs for Google Apps served us well here, as we already were interacting with Google Docs.

2. Simple to manage and run. We wanted to keep the management piece as close to what already existed as possible. This meant utilizing as much of our work on DDPs for Google Apps intact, and wrapping the mail merge piece around it. At runtime, the user shouldn't have to deal with complicated forms or having to connect files together like is the norm for desktop applications.

The first problem was easily solved by extending our existing implementation with Google Docs. Leveraging Google APIs, we are able to use Google Docs for both management of the mail merge and storage of the results. Since we wanted the management to leverage our existing technology and to be both simple and entirely based in the cloud, we decided it would be best to make it wrap around our existing DDP functionality. To manage the merge data, we create a folder inside Google Docs and place within that folder a single spreadsheet. All data for a merge can be placed in that spreadsheet, which we then tie directly to the existing DDP at runtime. Each row is now considered a single DDP run with all the results streaming back to Google Docs.



One of the biggest values of utilizing a Google spreadsheet for managing the mail merge as you have all the same functions as you normally have with spreadsheets, such as Google forms. You can easily tie a form to the mail merge spreadsheet and allow your own customers to populate your data for you.

You can install your free trial of DDPs for Google Apps by visiting the Google Apps Marketplace and clicking on the "Add it now" button.

If you have questions or ideas you'd like to share on this or any of our other offerings, please visit us this week in the Developer Sandbox at Google I/O!

Posted by Jonathan Howard, Lead Developer of Drawloop Technologies