How-To Send Auto Reply Email on Submission of Google Docs Contact Form
Why Send Auto ReplyThe default Google contact form feature provides a google docs spreadsheet with user responses, and responding to them needs to be done using manual emails. Sometimes its not feasible to reply back to people immediately, I have found some of the main reasons as listed below
- In case your site is really popular and lot of people are trying to reach you.
- There may be lot of spam contact messages.
- There may be worldwide customers trying to reach you during odd working hours/weekends.
- You may be on vacation.
- You need some time to do research before you respond.
- Some of the categories need not be attended since your answers can be canned. e.g. you want to thank your customer for providing feedback or some help.
Below are simple steps to setup the auto reply email.
- Create Contact Form
In case you have not created the contact form before, don't worry. Its really easy and free. Checkout this simple Youtube Video about "How To Create Contact Form on Google Docs". This example assumes you have at least four fields in your contact form (Name, Email, Subject and content/message). Checkout our contact form for details.
Special CautionPlease make sure you take care of following things when you create a form and update any code in script.
- Field names are case sensitive. Please make sure the field names are exactly matching in the script. (e.g. Email, Subject)
- Make sure to update the script with your own email address on this line
var myemail = "email@example.com";
- In case you want the auto reply content to be really big make sure you split it into multiple lines (and use Javasctipt append) like below instead of keeping all text in one double quote.
var message = "Thanks for contacting FromDev.com. We will get in touch with you shortly. \n\n-----\n\n"
+ "Another line \n"
+ "Another line";
- Tools - Script Editor - Resources - Current Script's Triggers
- Select Function name "sendAutoReply"
- Select "From Spreadsheet"
- Select "On Form Submit"