Mail merging, the process of automatically generating personalized emails by combining variable information (such as a list of names) with a base template, can be a big time saver when you need to send similar emails to a number of people. Plenty of options exist for performing mail merges, including Microsoft Office and online resources such as Mail Chimp. If you just need to send a few basic scripted emails, however, Google Docs can do the job fairly well.
In addition to enabling you to perform a simple mail merge, I also plan to use this task as an example of some very basic scripting that is possible within Google Docs. For this post, I won't go in to any of the programming details, but in later posts, we'll spend a little time looking at how the mail merge script works, how to modify it, and how scripting can be useful in other instances.
The Google Docs mail merge template comes from this post, and if you're interested in reading through the author's description, it gives a good run down of how to use the scripts. I'm just going to give a brief review of how it works here, to highlight some of the things we'll be thinking about when looking at the scripts down the road.
To get started, create a new copy of this spreadsheet in your Google Docs. You should see some colored cells, as well as menu bar with a new "Mail Merge" option. From this menu, you can optionally choose to import your contacts from Gmail (the script will prompt you for the contact group to use). Alternatively, you can manually enter names and email addresses in the appropriate yellow columns.
In the green boxes, you can customize the subject, greeting (after which will be placed the name), content, and outgoing email address for your message. After finishing the entry of the contacts and the content, just choose "Start mail merge" from the menu, and an email will be sent to each contact represented in the yellow boxes. As the emails are sent, the status box will change to "OK" indicating that the message has been sent. It's worth noting that Gmail has some ill-defined limits on the number of emails you can send out, so if you need to send mail to a large distribution list, it's better to use a full-featured service like Mail Chimp.
That's pretty much it for the basics of the mail merge. If you've ever programmed before, it's probably pretty easy to imagine what's going on behind the scenes. If not, you probably still have a pretty good idea that the program goes through the yellow rows, then writes and sends an email for each one, using the information from the green cells. Next time, we'll take a look at the actual script and talk about some basic customization options that aren't possible explicitly from the spreadsheet.