Saturday, February 21, 2015

Trigger an email after submitting Google Form

අද ඔයාලට ගවේෂක Google Forms and Triggers ගැන කියන්නයි යන්නෙ..

Event Registrations සදහා වර්තමානයේ ගොඩක්ම ජනප්‍රිය දෙයක් තමයි Google Forms කියන්නෙ. ඔයාල එහෙම Form එකක් submit කරාම ඔයාලගේ mail account එකට email එකක් ඇවිත් එහෙම ඇති නේද ?

ඉතින් අපි බලමු කොහොමද ඒ වැඩේ කරගන්නෙ කියල‍ා.

First you need to goto your google drive and create a form application.

Then give a suitable name for it and add your fields for the form . In this case i added only the email address to enter in the form.

Then goto Tools -> Script editor 

Choose blank project 

 Then add the follow code

var message, means the message you need to send for each registration.It can be manuslly added in your spread sheet.

Also we set a column for email status to check whether email confirmation has been sent or not

So to set the code to be run as a trigger goto Resources->Current Project's triggers

Add it as On Form submit then save it

Then goto your form and enter your email and submit.
After that you can see the following record is there and the email status is changed to "EMAIL_SENT".

Finally chheck your emails :)

I hope you will understand how it was done using triggers .So keep in touch with the explorer. We will meet on next Post .

No comments:

Post a Comment