Forms do have the option of sending an email alert whenever someone fills out the form, but the alerting email doesn't include the actual form data, so you're still tied to constantly logging into that account to get the information. Enter: Google Apps Script. With a little knowledge of JavaScript, you can use their library of classes and methods to add functionality to basic Google forms.
I started out just wanting to be able to receive an email when someone submitted a form, with all the responses included. For this I found a really nice tutorial from Amit Agarwal (http://www.labnol.org/internet/google-docs-email-form/20884/). If that's all you need your form to do, great! You got it, dude.
I needed a few extras though. First, some of the forms need to go to multiple people. You can easily do this with a slightly more advanced version of the sendEmail method. (You can find documentation on the MailApp class and various iterations of the sendEmail method here: https://developers.google.com/apps-script/reference/mail/mail-app. Also helpful, their Understanding Events cheat sheet: https://developers.google.com/apps-script/understanding_events)
Essentially, you just need to find this line in the original code:
MailApp.sendEmail(email, subject, message);
and change it to:
MailApp.sendEmail(email, subject, message, {cc: email
of person you want to copy});
You can cc multiple people by just separating their email addresses with commas.
One of the librarians, however, wanted users to indicate what department they were affiliated with, and then have a copy of the form results go to the department liaison. This is where things start to get a little complicated, and it's helpful to know a little bit about programming languages. I wrote a simple switch statement (with some help from Babs, of course, my go-to programming guru.)
var dept = e.values[array location
of dropdown].toString();
var contact = toString("xx");
switch (dept) {
case "dropdown value 1":
contact = "email address 1";
break;
case "dropdown value 2":
contact = "email address 2";
break;
default:
contact = "default email address";
}
Your switch statement is then just comparing that value to values that you associate with email addresses, and then assigning the associated email address to the variable "contact", so now your method call looks like this:
MailApp.sendEmail(email, subject, message, {cc: contact});
Ok, if I haven't given you a headache yet, there's one more tweak you can do to increase the usability of the form submission email. Using 'e.values' again, you can pull the user's email address from their form submission, and set it as the reply-to on the resulting email. That way, if the person who gets the email has a question for the submitter, they can just hit reply (default reply-to is the gmail account that you're using to create the form.)
Again, since the time-date stamp is [0], you just need the question number where you ask for the user's email address, and now you've got:
var reply = e.values[array location of user’s
email].toString();
MailApp.sendEmail(email, subject, message, {cc:
contact, replyTo: reply});
You can check out the whole script, as I use it, here.
If you've done any Google form hacking, I'd love to hear about it in the comments. I've only just begun delving into the possibilities here!
5/23/14 - I just stumbled across this post about using Google Forms for leaderboards/summer reading programs. It's also another good example of hacking Google Forms with formulas and scripts.