Тёмный
No video :(

How to send a confirmation email with Google Forms 

Jeff Everhart
Подписаться 3,9 тыс.
Просмотров 71 тыс.
50% 1

Click for written step-by-step directions and code: www.jeffreyeverhart.com/2014/0...
In this short tutorial video, we will walk through how to use Google Apps Script to send a confirmation email from a simple Google Form. It might be useful to have some understanding of Javascript or Google Apps Script syntax before trying this tutorial.

Опубликовано:

 

30 янв 2014

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 223   
@devenjain7116
@devenjain7116 4 года назад
Update: the trigger option can now be found under the Edit Tab of the script editor window. PS: Thanks Jeff for the tutorial, it really helped me. Now we don't need any third party mail merge. We can just make our own. I admire your work. Keep it up!
@jeffeverhart
@jeffeverhart 4 года назад
Thanks! This is a pretty old video, so maybe I need to record an update. Thanks for watching!
@devenjain7116
@devenjain7116 4 года назад
@@jeffeverhart hey, I needed some help with my code I have written an if statement just before the MailApp.send line and linked it to a checkbox in the spreadsheet that will give value TRUE or FALSE depending on whether it's checked or not. The idea is, that I want to send email only when checkbox is clicked. I can't figure out a way to make it work and all stack overflow codes Don't make sense to me. If you could please make a video about it, then it would be great! :)
@jeffeverhart
@jeffeverhart 4 года назад
@@devenjain7116 Post your code in the comments on the blog post linked in the description and I'll take a look and see if I can point you in the right direction.
@devenjain7116
@devenjain7116 4 года назад
@@jeffeverhart Okay sure!
@thehendyimage
@thehendyimage 8 лет назад
How very kind of you to share how to do this. It helps me tremendously.
@jeffeverhart
@jeffeverhart 8 лет назад
+Amy Hendy Thanks for watching!
@dbarkley1374
@dbarkley1374 10 лет назад
Jeff is great! Very knowledgeable and informative. I recently contacted him because I needed some custom code. He responded to my emails very quickly and was able to answer all my questions and help me get started on my project. Jeff is definitely a seasoned, experienced expert programmer. Thanks Jeff!
@realsuddenlike6046
@realsuddenlike6046 9 лет назад
Great video, thank you!
@oksanabolanos110
@oksanabolanos110 8 лет назад
It's the best what I've found online! Thank you very much!
@jeffeverhart
@jeffeverhart 8 лет назад
+Oksana Bolanos Thanks for watching!
@knjvrijnenduin
@knjvrijnenduin 9 лет назад
Thanks Jef, for me still learning new things and possibility's.
@zemarioart
@zemarioart 9 лет назад
Thanks, Jeff. You´re my hero!
@jeffeverhart
@jeffeverhart 9 лет назад
Google Apps Script to the rescue. Thanks for the kudos!
@matejmuha1917
@matejmuha1917 7 лет назад
Hi Jeff, thanks for the tutorial! I have a question though. Is it possible to delay somehow the confirmation email? I would like to send out the confirmation email 2 hours after a user submits the form.
@michaelmitchell2230
@michaelmitchell2230 5 месяцев назад
Thank you for this tutorial! Although the Sheets scripts app has changed a bit it was still tremendously useful!
@thecms297
@thecms297 8 лет назад
Thanks, Awesome explanation.
@jeffeverhart
@jeffeverhart 8 лет назад
+The Cms Thanks for watching!
@fabenevides
@fabenevides 10 лет назад
Thanks man! Just what I needed.
@jeffeverhart
@jeffeverhart 10 лет назад
No problem! Thanks for the comment. Let me know if you run into any other Google scripting problems!
@Switchprokid
@Switchprokid 8 лет назад
Thank you for the tutorial. Do you know if there is any way to see where the respondents where when they answered? So apart from the time stamp, is there a GPS "stamp" option?
@jeffeverhart
@jeffeverhart 8 лет назад
+D.F. Painting Since I don't think Google Apps Script can access the navigator object in the browser to use the geolocation API there, I think you'd have to link into the Google Maps API: developers.google.com/apps-script/guides/services/external?hl=en What is your end goal. If it's super advanced it might be better to do with another technology.
@ilovevalentine22
@ilovevalentine22 10 лет назад
This is great! I was wondering if there is an easy way to change font sizes? Thanks
@jeffeverhart
@jeffeverhart 10 лет назад
The most I've been able to do is bold the font, which you can do by creating an HTML body message. I'd take a look at how they send HTML though the MailApp at this link: developers.google.com/apps-script/reference/mail/mail-app Not sure if other styles are possible or not, but anything more complicated than bold or italic would need to be CSS instead of HTML. Let me know how it works out!
@idlequalms5847
@idlequalms5847 10 лет назад
subscribing, keep up good work, this was very helpful.
@jeffeverhart
@jeffeverhart 10 лет назад
Thanks for the sub! Your comments are much appreciated.
@demonickitten93
@demonickitten93 10 лет назад
Hi! Thank you so much for this tutorial! I have a very quick question though. Some of the responses on my form are optional. When the confirmation email sends, it says that the optional responses are "undefined" if they are left blank. Is there any way to make it so that the blank optional responses are left blank in the confirmation email?
@jeffeverhart
@jeffeverhart 10 лет назад
Unfortunately, I don't think so. This status is a fairly recent change, and I haven't yet found a way to make those optional elements appear as blank instead of undefined. That doesn't mean that it can't be done, rather I just haven't invested the time in figuring out how until this point. If you find a work around please post it here so I can share it with everyone. Thanks for the views and comments! JE
@mydearryl
@mydearryl 10 лет назад
awesome thank you so much!
@jpstanley08
@jpstanley08 7 лет назад
Thanks for the tutorial. May I know if it's possible to do some basic calculation using either column?
@jeffeverhart
@jeffeverhart 7 лет назад
Sure, you would just need to write some JavaScript code in the script editor to do some calculations, or you could write a function in another column that operates on data from the columns that are populated with the form submission.
@jpstanley08
@jpstanley08 7 лет назад
i did but whenever a form is submitted, the cell that has the function just becomes blank. may i know if you know why?
@rogeriolacerda6650
@rogeriolacerda6650 9 лет назад
It worked ! thank you
@jeffeverhart
@jeffeverhart 9 лет назад
Awesome! Thanks for the share.
@ezetov
@ezetov 10 лет назад
Hey what's up? I wanted to ask whether it is possible to automatically send an invoice through Google Docs? The intention is that if you fill out a form then it sends an email with an attachment that individuals vary according to Google docs fields. I would be happy if you help me lior
@matejstanovsky3760
@matejstanovsky3760 9 лет назад
Hi Jeff, THANK YOU SO MUCH !!!!!! I did not have a clue that this is possible to do with google drive forms. :)
@jeffeverhart
@jeffeverhart 9 лет назад
No problem! Thanks for watching!
@abhimanyurathore6580
@abhimanyurathore6580 3 года назад
Hi Jeff, I want to use the conditional mail merge feature using Google form. Means, I have a column with 10 multiple choice answer. And based on the user selection I want to send a custom email (10 multiple choices have 10 different email templates). Is it possible to do with Google scripts?
@allychi
@allychi 9 лет назад
Excellent, simple and clear and it works~~~ Help me a lot!!! thank you very very much!!!!
@jeffeverhart
@jeffeverhart 9 лет назад
Great! Thanks for watching!
@leodumora5498
@leodumora5498 8 лет назад
Hey ! Thanks for your great tutorial, it's working fine ! I was wondering how can in select a value from an other sheet (on the same spreadsheet). I created an other one where i do calculations, i would like to insert the result in my email. This value is on the 2nd sheet, 6th column, so I tried something but didn't work: var userCommande = e.sheets[1].values[5]; I know this is some basic stuff but can't manage to find this solution with research, i'm becoming mad so here i ask haha. Thanks :)
@jeffeverhart
@jeffeverhart 8 лет назад
+Léo Dumora You should be able to do something like the following: var sheet = SpreadsheetApp.getActiveSpreadsheet.getSheetByName(); var value = sheet.getSheetValues(arguments); You can find some examples here: developers.google.com/apps-script/reference/spreadsheet/sheet#getsheetvaluesstartrow-startcolumn-numrows-numcolumns
@profitinsight6120
@profitinsight6120 10 лет назад
Great stuff. This is a big help.
@jeffeverhart
@jeffeverhart 10 лет назад
Thanks for the kudos!
@allychi
@allychi 9 лет назад
if I want to send confirmation with a sequence number ( say it's a space limited event, only the first 20 response got the seats). how to build that into the email? Can I insert one column into google from response and include that in the function script? I am not a computer science major and know very little of code or things like that... sorry about that....
@nexsourcepakistan1943
@nexsourcepakistan1943 6 лет назад
Thank you sir very helpful sir
@FiEisALz
@FiEisALz 7 лет назад
Hi, how do you make text bold, italics, and underlined, or change color, for example to blue? Thank you.
@jeffeverhart
@jeffeverhart 7 лет назад
You have to use a more advanced function to send html emails. You would basically need to send the htmlBody advanced parameter option as listed here: developers.google.com/apps-script/reference/mail/mail-app#sendEmail(String,String,String,Object) It's always a good practice to send a plain text version of the message as well even if you send html.
@FiEisALz
@FiEisALz 7 лет назад
Sorry for the late reply, but thank you. Really appreciate it, also the video tutorial.
@DawnWolfArtist
@DawnWolfArtist 4 года назад
Is there a way to set this up so that it sends the "Thank you" message to the person filling out the form and a different message to a different specific email that says something like "Help request submitted..."?
@jeffeverhart
@jeffeverhart 4 года назад
Yup, you would just run the logic to send the emails twice
@Chubbable
@Chubbable 7 лет назад
Thanks Jeff! It didn't worked for me in my first try. So I double check the syntax and found out that it should have a space in `MailApp.sendEmail (userEmail, subject, message);` - on your video -> `MailApp.sendEmail(userEmail, subject, message);` which didn't worked in my case.
@jeffeverhart
@jeffeverhart 7 лет назад
Thanks for letting me know. White space shouldn't matter with JavaScript, but this video is a few years old at this point :)
@asdfasdf7340
@asdfasdf7340 10 лет назад
Thanks for the tutorial. I was wondering if there was a way to write a longer message and have it formatted properly. I try to write a long message and the whole message gets squished together. Thanks.
@jeffeverhart
@jeffeverhart 10 лет назад
Yes, you can. After each line include the new line character " " without the quotes. For example, you might write something like "Hello Thanks for watching! Please check out these other videos." Each time you use the the HTML will display on another line. Also remember to leave spaces at the end of your sentences before you close the string with quotes so that any variable data doesn't smash up against the HTML. Thanks for watching! Let me know if you have other questions.
@degroathall1130
@degroathall1130 10 лет назад
Any ideas why line 2 keeps saying: TypeError: Cannot read property "values" from undefined. (line 2, file "Code") unction myFunction(e) { var userName = e.values[1]; var userEmail = e.values [5]; var TrainingNumber1 = e.values[2]; var TrainingNumber2 = e.values[3]; var TrainingNumber3 = e.values[4]; var subject = "Registration Submitted"; var message = " + userName + " " \Thank you for your Student Conduct Justice On Going Training Regisration" " The registered for the following the training sessions: " + " Training Number 1: " + TrainingNumber1 + " Training Number 2: " + TrainingNumber2 + " Training Number 3: " + TrainingNumber3 + " All training sessions will be held in the Residence Life and Housing Conference Room in Van Hoesen Hall A-28A"; MailApp.sendEmail(userName, subject, message); } Thanks!!
@jeffeverhart
@jeffeverhart 10 лет назад
Hello, That is a pretty common error that I've addressed elsewhere in the comments. Try looking in the comment thread below for my reply to sarahessentials (3 months ago). Try that solution and comment back if it does not work. Regards, JE
@HA-zj7zp
@HA-zj7zp 9 лет назад
This is great! Question though. On my responses form, I have a vlookup formula that looks up the name (inputted on the form) to get their email address. The email address is correctly auto-populating on column E.. which i show as var userEmail = e.values[6]; but I don't get an email. Do you have a workaround? Thank you!
@jeffeverhart
@jeffeverhart 9 лет назад
Yea, they will actually have to input their email addresses into the form using this method. The 'e' or event parameter is not taken from the spreadsheet even though it is bound to it. As the user submits the form, it triggers the submission event (e) which contains all of the users responses to the form in an array. If they didn't submit it through the form, you won't be able to access it using the e.values syntax. You will have to manually get that range using some of the methods associated with the Spreadsheet App: developers.google.com/apps-script/reference/spreadsheet/spreadsheet-app
@bhargavidhani
@bhargavidhani 9 лет назад
Thank you so much for this tutorial! Very easy to follow and customize. For some reason, it sends two emails sometimes instead of just one. It doesn't always do it so I don't think I entered the code wrong. What could be the problem?
@jeffeverhart
@jeffeverhart 9 лет назад
Bhargavi Dhanireddy Sometimes this happens when you are testing and submit more than once. If you want, you can post your code to the comments and I'll take a look.
@bhargavidhani
@bhargavidhani 9 лет назад
Jeff Everhart function myFunction(e) { var recipient = e.values[3]; var subject = "Pi Day T-shirt"; var body = "message that is very long"; MailApp.sendEmail(recipient, subject, body); }
@jeffeverhart
@jeffeverhart 9 лет назад
This all looks fine. Maybe just check to see if you accidentally set two triggers. Otherwise just chalk it up to a bug.
@indrogs
@indrogs 8 лет назад
Thanks for sharing.
@jeffeverhart
@jeffeverhart 8 лет назад
+indrogs Thanks for watching!
@bjmacnevin
@bjmacnevin 10 лет назад
For the mailing "subject", do you specify that as a variable just like the message?
@jeffeverhart
@jeffeverhart 10 лет назад
Yes, you can create a separate variable for the email subject, but you could also just place the subject as a string in quotes within the parameters for the MailApp method. I'd recommend creating a variable though, since this will make your code a bit cleaner at the end of the day. Check out the code snippet at the bottom of this page to see how I did it in this vid: www.jeffreyeverhart.com/2014/01/31/tech-tip-how-to-send-a-confirmation-email-with-google-forms/ Thanks for the views, JE
@bjmacnevin
@bjmacnevin 10 лет назад
Thanks! Any idea if it's possible to include two addresses in the bcc the same way?
@jeffeverhart
@jeffeverhart 10 лет назад
Brian MacNevin Hmmm...that's a good question. I've never done it before, but I'd try surrounding the bcc emails with brackets to make an array: bcc: [ userEmail1, userEmail2] Check out the examples that uses options and lists bcc as an advanced parameter here: developers.google.com/apps-script/reference/mail/mail-app. Comment back and let me know if that works. I'm intrigued now.... JE
@rafmaits2831
@rafmaits2831 8 лет назад
Is it possible to add captcha on google forms? Using Google Apps Script? Or any methods?
@jeffeverhart
@jeffeverhart 8 лет назад
+Raf Maits Maybe, check out this link: developers.google.com/recaptcha/?hl=en, or this one that uses more JS: www.freshtechtips.com/2013/05/custom-google-drive-contact-form.html
@bibulkumar
@bibulkumar 8 лет назад
Hi Jeff, Can we send a text message instead of email? Is there any script for that
@jeffeverhart
@jeffeverhart 8 лет назад
Awesome question! There isn't a Google service that supports SMS as far as I'm aware, but using URLFetchApp (developers.google.com/apps-script/reference/url-fetch/url-fetch-app) you could send an HTTP request to a third-party service like Twilio (www.twilio.com/) that could send the message on your behalf. Unfortunately, you likely won't find an out-of-the-box script for that, so let me know if you end up needing any consultation as you develop the solution.
@hillaryous61
@hillaryous61 8 лет назад
i've done this before, but when i start entering my "var userName = e.values[1];" it gives me a type error "cannot read property "values" from undefined" but i can't figure out why, it should be able to read that..?
@jeffeverhart
@jeffeverhart 8 лет назад
+Hillary Kaplan Did you submit a test form or click run in the script editor? You have to submit a test form, also make sure you are passing e into the function: function (e) { //everything else}
@solomonncube3660
@solomonncube3660 9 лет назад
Hi Mr Jeff, Thanks for the code however I'm not sure why mine isn't giving any error yet not sending me the mail as set. function myFunction(e){ var userName = e.values[4]; var userEmail = e.values[5]; var subject = "Form Submitted"; var message = "Thank you " + username + "for completing our student registration form"; MailApp.sendEmail(userEmail, subject, message) } My sheet table is as below; 0 1 2 3 4 Timestamp Student Number Title Name Surname E-mail address
@jeffeverhart
@jeffeverhart 9 лет назад
+Solomon Ncube It looks like the email address should be e.values[4] based on what you have in the sheet here.
@norbclementerodrig1
@norbclementerodrig1 8 лет назад
I have a question and been browsing online for a while but haven't found an answer. How to add a verify email address link on autoresponder for google forms. I want to be able to know that the information entered in a google form corresponds to the email being submitted in the form. So far I've been able to add a custom message after filling out information but no luck on verifying that address, otherwise anybody could fill out and submit using other ppls email.
@jeffeverhart
@jeffeverhart 8 лет назад
That's an awesome question, but I don't know that something like that exists out there. Not to say you couldn't make one though. I'll put some time into researching a way and let you know what I come up with. You'd need some UI out there they could go to. Thanks for the awesome question, and thanks for watching. If you find anything good, comment me back so I can put it here for the community.
@norbclementerodrig1
@norbclementerodrig1 8 лет назад
There are many websites out there where after signing up your account is activated only after you verify the email you used to submit your information via a link on autoresponder email sent to you. The thing is that a google form can be filled by anyone with the link and is easy to get confused and cheat it anyone wants to. I've been trying to draw contracts out using google form and that unique feature could help verify identity.
@GASecurityLtdDarlington
@GASecurityLtdDarlington 9 лет назад
Great video, its it possible to get the form sent as an attachment such as a PDF ? cheers
@jeffeverhart
@jeffeverhart 9 лет назад
Thanks for the kudos! Check out part two on how to write the same basic script that includes a PDF attachment: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FzBQZAhjHeI.html
@GASecurityLtdDarlington
@GASecurityLtdDarlington 9 лет назад
Jeff Everhart great stuff just seen it :) having problem with my code , any ideas ? function myFunction(e){ var CompanyName = e.values[1]; var PropertyName = e.values[2]; var TimeofResponse = e.values[3]; var NewKeyTagNumber = e.values[4]; var DateTime = e.values[5]; var ReasonforVisit = e.values[6]; var DurationSpent = e.values[7]; var Notes = e.values[8] var ActionTaken = e.values[9]; var ReportCompletedby = e.values[10]; var useremail = e.values[11] var subject = "Form Submitted"; var message = "Thank you, " + userName + " for choosing " +date; MailApp.sendEmail(useremail, subject, body):
@jeffeverhart
@jeffeverhart 9 лет назад
G&A Security NE Ltd So, based on what I see here, the two variables you use to create the message aren't declared anywhere else( userName and date). Make sure that the variables you use to construct the message are declared elsewhere and set to equal specific values from the spreadsheet.
@jackychuab.g.8118
@jackychuab.g.8118 7 лет назад
Triggers are now found under the "Edit Tab", "All your Triggers". Otherwise, the code works fine. Thanks again.
@jeffeverhart
@jeffeverhart 7 лет назад
Thanks, it's about time to update these videos. I appreciate the info.
@jackychuab.g.8118
@jackychuab.g.8118 7 лет назад
Jeff, thanks. Was trying to improve your code, and Gmail to send canned messages that are on a timed schedule. Will inform once I am successful. Anyway, I'm really appreciative about this share, which enabled me to bypass paid services. Thanks again. Sincerely, Jacky Chua Author, Bloggerized Profits
@jeffeverhart
@jeffeverhart 7 лет назад
That sounds pretty cool. It seems like time-based triggers might work, or if you want to do it in JS, the setTimeout method would be appropriate. Let me know what you come up with. Thanks again
@jackychuab.g.8118
@jackychuab.g.8118 7 лет назад
I was playing with specific time triggers and they worked. Since these canned emails are short, all that's needed is an extension to your code, to time the send-out process upon receiving the opt-in. Will be finalizing the code this week, to allow users to opt-out (still trying ;-), with not much success), just like any other paid autoresponder services.
@carlosgodward3018
@carlosgodward3018 10 лет назад
Hi Jeff! Good and simple video. Just a question: Instead of sending an email to who submitted the form I would the message to be sent to me. How would this be done?
@jeffeverhart
@jeffeverhart 10 лет назад
instead of creating a variable that stores the form input data, just create a variable that stores your email address: var userEmail = "youremail@example.com" Then, run the MailApp method using that variable and you will get the message and data.
@carlosgodward3018
@carlosgodward3018 10 лет назад
Will yry it out. Thanks a bunch.
@MattPolaniecki
@MattPolaniecki 9 лет назад
I'm getting this error. Any idea why? TypeError: Cannot read property "values" from undefined. (line 2, file "") Great video!
@jeffeverhart
@jeffeverhart 9 лет назад
Matt P Hey Matt, Please check the comment thread below. This has been answered a few time already. Thanks for watching!
@FamilyofVikingFans
@FamilyofVikingFans 10 лет назад
I tried to use this process with a spreadsheet that I am currently using formRanger with and can not get it to work. Do you know if it is possible to use this in addition to the code that is part of formRanger? Thanks so much for your help!
@jeffeverhart
@jeffeverhart 10 лет назад
That is a good question. I'm not familiar with formRanger, but I just googled it. When you enter the script that I demo here, are you inputing it in the same .gs file as the formRanger script? If so, you might try creating a new .gs file in the script editor for just the email script, otherwise the triggers for the two different scripts might conflict. Let me know how that works for you. Thanks for watching.
@FamilyofVikingFans
@FamilyofVikingFans 10 лет назад
I was able to get it to work. I had created a separate tab for this code but after revewing it several times I realized I had an error in it. Thank you so much for your quick response and this great video. Incredibly helpful and easy to follow :)
@jeffeverhart
@jeffeverhart 10 лет назад
***** Thanks very much! Please reach out if you have the need in the future. Cheers:)
@DeepBlueMuslim
@DeepBlueMuslim 8 лет назад
Is it possible to have a script send an email when a user submits a form but the emails to send to come from a different excel sheet and are themselves being added to constantly. sort of a notification system.
@jeffeverhart
@jeffeverhart 8 лет назад
Sure, that is possible. You'd just need to use the Spreadsheet class to access the spreadsheet with the emails and pull them in. Do this before you send the users form data in the email, and make a variable to hold the email address(s) you pull out of the form. Check out the examples here: developers.google.com/apps-script/reference/spreadsheet/spreadsheet
@DeepBlueMuslim
@DeepBlueMuslim 8 лет назад
+Jeff Everhart thank you so much, can't say I'm very technical but when better to learn!
@jeffeverhart
@jeffeverhart 8 лет назад
Great attitude! Let me know if there is something specific you want me to look at later. Good luck learning!
@torrance007
@torrance007 7 лет назад
How can we attached PDF File with that Email
@jeffeverhart
@jeffeverhart 7 лет назад
I've got a video on that here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FzBQZAhjHeI.html
@f38stingray
@f38stingray 8 лет назад
For you guys with the undefined issues, I've found one possible problem. Google has changed the form handling so that any blank values turn into undefined ones. Stackoverflow has a solution titled, "e.values in google forms skips empty answers, is there a workaround?" Another thing to check is that you create the script from the tools menu on the spreadsheet, not the form.
@jeffeverhart
@jeffeverhart 8 лет назад
+f38stingray Thanks for the awesome follow-up! Good point about making sure to use the script editor in the SS and not the form. If you're having issues with undefined values on optional form elements, I have written checker functions like the one below: function checkUndefined(valueToCheck){ if (valueToCheck === undefined){ //change data here } } Thanks for watching!
@hhkgenset829
@hhkgenset829 9 лет назад
Hey Jeff, hope you are doing well.. dear i am unable to attached the Word Document File. pls help me out
@jeffeverhart
@jeffeverhart 9 лет назад
Hhk Genset Can you post the code you are using on the other video?
@ozkanarrslan
@ozkanarrslan 9 лет назад
hi jeff scripts doesnt work with another script, how can we run 2 scripts.
@jeffeverhart
@jeffeverhart 9 лет назад
You can add both functions to one script file and set separate triggers for both.
@Thatguyy7439
@Thatguyy7439 7 лет назад
Hi Jeff. Excellent tutorial. Is there a way to insert a hyperlink into the text of the email? I'd like for the recipient to click on @username and be taken to my Instagram.
@Thatguyy7439
@Thatguyy7439 7 лет назад
Nevermind; I figured it out. It involved adding a url as a variable, a little bit of @username in the message string, inputting {htmlBody:message} into the email command string, and changing my line breaks from to . So yeah. Not that I know what any of that means really. :)
@jeffeverhart
@jeffeverhart 7 лет назад
Rock and roll! That is exactly what I was going to say. Glad you go this working. Thanks for watching!
@Tarunkumar-lg7mc
@Tarunkumar-lg7mc 9 лет назад
when i run code it will show line 2 error "values" please solve problem
@jeffeverhart
@jeffeverhart 9 лет назад
Try actually submitting the form to see if the error is still there. You will always get that error when running from code editor. See responses in the threads below for more detail.
@davidrutter1618
@davidrutter1618 5 лет назад
I can't get this to work. I enter the below function myFunction(e){ var userName = e.values[1]; var userName = e.values[1]; var userEmail = e.values[2]; var date = e.values[3]; var subject = "Form Submitted"; var message = "Thank you," + userName + "for choosing " + date; MailApp.sendEmail (userEmail, subject, message); } but get the following error TypeError: Cannot read property "values" from undefined. (line 2, file "Code")Dismiss
@jeffeverhart
@jeffeverhart 5 лет назад
Check out this link: jeffreyeverhart.com/2016/08/06/fix-typeerror-cannot-read-property-values-undefined/
@augustomarcelo
@augustomarcelo 8 лет назад
How do I get the values and add? I put on a tie 'for', but the values are retrieved as a string.
@jeffeverhart
@jeffeverhart 8 лет назад
+Marcelo Augusto If you want to add them as integers, you should be able to use the parseInt() JS function to parse a string into an integer.
@augustomarcelo
@augustomarcelo 8 лет назад
+Jeff Everhart It worked, man, thank you! I would also like to set a value for a particular column in my spreadsheet. How can I retrieve that column without being indexes, because I can add more questions and it would make me change the script.
@jeffeverhart
@jeffeverhart 8 лет назад
+Marcelo Augusto No problem! I'm not sure of a way to get a column without using an index unless it was always in the last column, in which case you could use getLastColumn( ). You might also find another useful method here: developers.google.com/apps-script/reference/spreadsheet/sheet
@augustomarcelo
@augustomarcelo 8 лет назад
+Jeff Everhart The method getLastColumn() worked perfectly. Thank you, very much!
@jeffeverhart
@jeffeverhart 8 лет назад
Awesome! I'm glad it worked. Thanks for watching!
@Jjustridepalawan
@Jjustridepalawan 10 лет назад
Hi jeff! The script on insert menu doesn't appear. Can you please help on that? thanks
@jeffeverhart
@jeffeverhart 10 лет назад
Hello Mayer, If you are looking for the script editor, it is under the "tools" menu in the spreadsheet. If you are talking about the script triggers, those are contained in the script editor under the "resources" menu, and the specific trigger we're looking for is "on form submit." Hope that helps, JE
@Jjustridepalawan
@Jjustridepalawan 10 лет назад
Jeff Everhart got it! Thanks brother! (Y)
@martindiaz3275
@martindiaz3275 10 лет назад
you think i can get the code?
@jeffeverhart
@jeffeverhart 10 лет назад
Hey Martin, I've put the code at this link: www.jeffreyeverhart.com/2014/01/31/tech-tip-how-to-send-a-confirmation-email-with-google-forms/ Just FYI, the script may change as you add user inputs. Let me know if you have questions. JE
@techcafe2387
@techcafe2387 8 лет назад
How does the MailApp just appear? I'm following the instructions step by step, but when you typed in MailApp , the pull down list just popped up???? I'm currently signed into my gmail using a non-gmail email. Do I have to be signed in using my gmail email & then it will just appear or did you do something that you did not mention? Thanks so much! Up till that point I was doing great.
@jeffeverhart
@jeffeverhart 8 лет назад
+S Relkin There is an autocomplete feature when I use the script editor in Google Chrome on a Mac. I'm not sure why it's not using the auto-populate for your case. If you're having trouble following the code in the video, check the link to my blog in the video notes. The whole script is there for you to copy and use. Thanks for watching!
@techcafe2387
@techcafe2387 8 лет назад
+Jeff Everhart I thought I deleted my comment. I realized I hadn't included the : and once it did it automatically appeared. Your tutorial was great and worked perfectly! Thanks so much! I'm wondering if you can answer another related question though. When I click on send form and tested inserting my email addess, when I fill out the form on my laptop that's embedded in the email and hit submit, when I then check my form, the rsvp is not there. When I pull the email up on my iPhone and fill out the form directly in the email, it then reopens the form and I have to fill it out again. That RSVP does show up on my form, but does not send the confirmation email that I created. I only receive the confirmation email if I follow the link to the online form and fill it from the start online. Any suggestions what to do???
@jeffeverhart
@jeffeverhart 8 лет назад
Hmmm. If I get what you're saying correctly, there are problems with the user experience when using the send form option? I usually just go to the live form, copy that link, and then send the link out by email. It should always take users out to the web to fill out the form, thereby giving you the result you experienced in your last example. Hope that helps! You could always use a link shortener to make it shorter or more readable.
@techcafe2387
@techcafe2387 8 лет назад
+Jeff Everhart Exactly! Also, my script editor is no longer there. Why would it disappear when I reopen the form?
@jeffeverhart
@jeffeverhart 8 лет назад
Check the spreadsheet. All of my example script work from the script editor in the spreadsheet.
@roguesandrascals
@roguesandrascals 9 лет назад
for some reason I just get an error when I try to run it. "TypeError: Cannot read property "values" from undefined.Dismiss" What am I missing? Here is my code (spreadsheet columns B and E are Name and Email respectively): function confirmation(e){ var userName = e.values[1]; var userEmail = e.values[4]; var subject = "Application Submitted"; var message = "Thank you, " + userName + " for your application. You will be placed on our waiting list " +date; MailApp.sendEmail (userEmail, subject, message);}
@Justicelephalala
@Justicelephalala 8 лет назад
+roguesandrascals Same here!
@jeffeverhart
@jeffeverhart 8 лет назад
+Justice lephalala This happens when you run the script in the editor. Since it needs form data to get an email address, you need to submit a test form to see actually run the script.
@mrs.hartzell7582
@mrs.hartzell7582 8 лет назад
I have submiited a form, but the email wasn't sent. Here is my code: function myFunction(e) { var userName =e.values[1]; var userEmail = e.values[2]; var date = e.values[3]; var subject = "Blue Slip"; var message = "Please do your homework," + username + date; MailApp.sendEmail(userEmail, subject, message);} Please advise.
@jeffeverhart
@jeffeverhart 8 лет назад
Did you set the trigger to on form submit, and is the code in the spreadsheet script editor? Also, did you get an error message or did nothing happen? Thanks, nothing is overtly wrong with the form.
@mrs.hartzell7582
@mrs.hartzell7582 8 лет назад
Yes, I set up the trigger on form support. How do I set up the code to editor on the spreadsheet? Nothing happened. When I clicked on run my function is when I got the error.
@Chubbable
@Chubbable 7 лет назад
Hi! Better checkout Jeff's link in the video description - Notice the `MailApp.sendEmail` it should have space before the opening parenthesis `(` . It didn't work for me for the first time. But when I checked the link, code posted there has space. -- snag.gy/AOsy0D.jpg
@narayguy
@narayguy 9 лет назад
thanks Jeff. you should make more of these. i create youtubes too and appreciate this! question - how can we change the from address that sends the confirmation email? i want to change this email to my client's email.
@jeffeverhart
@jeffeverhart 9 лет назад
Thanks, Greg! So there are two options. If you are building this for a client, you should first remove your trigger and have them go into the script, or log in as them, and set the trigger as themselves. This will reauthorize the script to send email as that user. The other option is adding a reply to address using this function: developers.google.com/apps-script/reference/mail/mail-app#sendEmail(String,String,String,String) Hopefully one of those helps! Let me know if you have any other questions. Thanks for the share!
@narayguy
@narayguy 9 лет назад
Jeff Everhart that's awesome. yeahh, sorta on a "no code whatsoever" basis with this client so even copy pasting wouldn't work for them. i'll do option two. as a javascript novice, do i just paste that developer code within the function at the end? what should i write for the "to" parameter given i just want this to say the email of who submitted the form? thanks so much again Jeff.
@jeffeverhart
@jeffeverhart 9 лет назад
Greg Narayan Hey Greg, The client shouldn't need to even touch the code, just set the trigger. I created a video walkthrough of that piece for an old client that they used just fine: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-hf0AqHpuRGg.html Take a look at that and see if you think they could follow. As for the code, just replace the MailApp.SendEmail function that I write out in the video with the linked example and swap the parameters for the custom variables you created. Something like this: var userEmail = e.values[1]; var clientEmail = myclient@client.com; MailApp.sendEmail(userEmail, clientEmail, "TPS report status", "What is the status of those TPS reports?");
@narayguy
@narayguy 9 лет назад
worked! :) brilliant stuff Jeff and well taught, thanks
@jeffeverhart
@jeffeverhart 9 лет назад
Awesome! Thanks for watching.
@ericaleung7117
@ericaleung7117 9 лет назад
Hi Jeff! Your tutorial is excellent! However, I'm having an issue. I had a previously created form and was trying to set up the confirmation email script. But when I tried to test it out and filled out the form - no confirmation email. So, I set up a completely new TEST form and used this: function myFunction(e) { var userName = e.values[1]; var userEmail = e.values[2]; var userEvent = e.values[3]; var subject = "Form Submitted"; var message = "Thank you " + userName + "for choosing " + userEvent; MailApp.sendEmail(userEmail, subject, message); } Still no email confirms. However, on my original script I'm getting these errors: ReferenceError: "Mailapp" is not defined. (line 9, file "Code") Authorization is required to perform that action. Here's the script for that: function myfunction(e){ var userName = e.values[1]; var userEmail= e.values[6] var date = e.values[7] var subject = "Form submitted"; var message = "Thank you " + userName + "for reserving tickets to the " + date; MailApp.sendEmail(userEmail, subject, message); } Any ideas? Thanks for your help!
@jeffeverhart
@jeffeverhart 9 лет назад
Based on your old error code, I'd go back and make sure that your triggers are set up properly. After you set the triggers to run the function on form submit, you will have to authorize Gmail to send email as you. My guess is that is what the "Authorization is required to perform that action" is all about. Try that first and let me know if it doesn't work. JE
@ericaleung7117
@ericaleung7117 9 лет назад
Jeff Everhart It worked! I had an old trigger that was preventing the new one from working. Thanks! And really...your tutorial is super!!!
@jeffeverhart
@jeffeverhart 9 лет назад
Thanks a lot! I'm glad it was able to help you out.
@ericaleung7117
@ericaleung7117 9 лет назад
Jeff Everhart Another question, since this form is used for work, is there any way (without creating a new gmail account just to use for work stuff) to format the sender email to a company name instead of my personal email?
@jeffeverhart
@jeffeverhart 9 лет назад
So, personally I don't do that. I use these for work a lot and just have defaulted to checking two emails when I've got a form live, but that is a bit of a bummer. Technically, it looks like it's possible using a Gmail alias you have set up, which you could retrieve with the code snippet here: developers.google.com/apps-script/reference/gmail/gmail-app#getAliases() This solution, however, would need to alter the code a bit from the example you got from my video. Instead of calling MailApp, which only sends mail as you, you would call GmailApp.sendEmail with the alias object as a parameter like in the linked example. GmailApp is just a bit more robust in terms of functionality. Hope that gets you started. JE
@narayguy
@narayguy 9 лет назад
here's another (perhaps trickier) question for ya Jeff. do you know how to change the email name the confirmation email sends from? see screenshot and arrow: www.dearblogger.org/wp-content/uploads/2015/04/change-email-name.png i've already tried changing Gmail settings, accounts, send mail as name, and this works for normal emails, but changes nothing as far as the confirmation email from Google Forms. your last advice helped me greatly to change the reply to email. any ideas how to change this email name to another email, or some text? thanks again.
@jeffeverhart
@jeffeverhart 9 лет назад
Hey Greg, In response to your initial comment I suggested removing the trigger from your account and reauthorizing under another account. Did you try that? As far as I know, that is the only way to change the email address that generates the email confirmation.
@narayguy
@narayguy 9 лет назад
Jeff Everhart i did indeed do that, which worked persay, but the problem for my client is it's sending from a Gmail. they want it to send from a custom email. i even tried POP3 pulling the custom email thru a new gmail, then inviting that custom email to the spreadsheet thru Google forms, then resetting the trigger. i just feel like there is a solution here that i'm missing. does that help at all?
@jeffeverhart
@jeffeverhart 9 лет назад
Yes, that does help, but I'm not sure what the solution is. The MailApp class is built to run through Gmail, so I'm not sure any amount of massaging will get it to send from a non-Gmail account. Another class that I haven't fully explored is the GmailApp, a more robust cousin of MailApp. You might find what you're looking for there, but again I don't know. Maybe something like getAliases( ) might work: developers.google.com/apps-script/reference/gmail/gmail-app#getAliases() If you find a solution, let me know so that I can share with future users. Good Luck, JE
@sayemsayem455
@sayemsayem455 8 лет назад
If you haven't find a solution yet there is one: After getting aliases, you have to use function "MailApp.sendEmail(recipient, subject, body, options)" As an option you are able to choose a sender's e-mail, which you set as an Alias of your GMail account. The same goes for the displayed name. That's my script: var aliases = GmailApp.getAliases(); Logger.log(aliases); GmailApp.sendEmail(recipient, subject, body, {from: aliases[0], name: "Your Name"}) developers.google.com/apps-script/reference/gmail/gmail-app#sendEmail(String,String,String,Object)
@jeffeverhart
@jeffeverhart 8 лет назад
Very cool, Sayem! I had a feeling the getAliases would work, but it's great to know for sure. Any now we have your example code to work from. Thanks for watching!
@delideli2985
@delideli2985 10 лет назад
It shown this TypeError: Cannot read property "values" from undefined. (line 2, file "FormEmailer")
@delideli2985
@delideli2985 10 лет назад
I didn't work even after I run it. I have submitted form through the Google Form. No email has been sent to the intended email address.
@delideli2985
@delideli2985 10 лет назад
I have two .gs script files under one project file, would this be a problem?
@jeffeverhart
@jeffeverhart 10 лет назад
Deli Deli It's possible that is the issue; you might try combining them into one script file. Another thing, have your set the trigger to run on form submit? Second, is the error you get coming through the email notification, or when you run the script in the editor? As it will always happen in the editor since we are pulling undefined values from an event that hasn't happened.
@delideli2985
@delideli2985 10 лет назад
I have solved using different codes. Thanks anyway.
@mikedear4163
@mikedear4163 10 лет назад
Deli Deli What was the different code you used?
@ariellebadgernewman8770
@ariellebadgernewman8770 10 лет назад
I followed all your steps exactly, and I'm not able to get this to work... it's not sending the emails.
@jeffeverhart
@jeffeverhart 10 лет назад
I'm going to need a bit more to go off of to help. Can you post the code below?
@delideli2985
@delideli2985 10 лет назад
Jeff Everhart It's not working... I just ran a test using the code like how you did: function myFunction(e) { var timeStamp = e.values[0]; var userName = e.values[1]; var userEmail = e.values[2]; var subject = "Payment Reminder: " + userName + "thank you for your support!‏"; var message = "Dear" + userName; MailApp.sendEmail(userName, subject, message); }
@jeffeverhart
@jeffeverhart 10 лет назад
Deli Deli Did you set the trigger on the spreadsheet? Otherwise, this code looks good.
@edwinhudepol8074
@edwinhudepol8074 9 лет назад
Hi Jeff great video and idea. Just i had it working fine. But suddenly it stopped working. It says it cant find the variable on line 2. Ive tried everything but nothing is wrong in the syntax since its the same as yours pretty much. Also the values are 0 indexing and referring to the correct column. Any idea why this is happening? This is the script: function myFunction(e) { var userName = e.values[2]; var userEmail = e.values[3]; var Subject = "Price Change Requested" var Message = " Thank you," + userName + " for submitting a change request "; var waiver = DriveApp.getFileById("1U2V5o9E7yubXDLDHQAO05JYWE3XnC-92MojmsmZ6z90"); var ChangePDF = waiver.getAs(MimeType.PDF); var ChangeExcel = waiver.getAs(MimeType.MICROSOFT_EXCEL); MailApp.sendEmail(userEmail, Subject, Message, {attachments:[ChangePDF]}); }
@jeffeverhart
@jeffeverhart 9 лет назад
Edwin Hudepol usually this happens when you run it in the script editor. Try to submit a test form and let me know what happens.
@edwinhudepol8074
@edwinhudepol8074 9 лет назад
I found it! Just have to create a new result sheet. And make sure theres no other columns but the ones from the form results.
@jeffeverhart
@jeffeverhart 9 лет назад
Awesome! Glad you got it working.
@edwinhudepol8074
@edwinhudepol8074 9 лет назад
Thanks! Can this work with excel attachments as well?
@edwinhudepol8074
@edwinhudepol8074 9 лет назад
Also i tried some html formatting in the message but it didnt work. I guess it doesnt work with html right?
@anaroman1499
@anaroman1499 9 лет назад
I did the exact thing and i got no email response
@jeffeverhart
@jeffeverhart 9 лет назад
coreyn goddard Then please post your code so that I can take a look. Even if the script is right, it won't work unless you set the triggers.
@juniorauxiliaryofeunice2729
@juniorauxiliaryofeunice2729 9 лет назад
Hi Jeff, thanks for the great tutorial. I'm having a problem that I hope you can help. I entered the following code: function myFunction(e) { var RunnerName = e.values[1]; var Email = e.values[2]; var subject = "Jingle Bell Rock N' Run 5K- Thank you for registering!"; var message = + RunnerName + ", thank you for registering for Junior Auxiliary of Eunice's Jingle Bell Rock N' Run 5K race! We will send race details to this email, " + Email + ", as the race draws nearer. We look forward to seeing you on Saturday, December 5, 2015!"; MailApp.sendEmail(Email, subject, message); } And the error message I'm getting says: TypeError: Cannot read property "values" from undefined. (line 2, file "Code"). I tried looking through the other comments to get hints as to why it's not working, and I saw Edwin Hudepol had to "create a new results sheet". Perhaps that's my problem? If so, how do I do that? This was the first script I had ever written, so I was feeling pretty proud of myself until it didn't work.
@jeffeverhart
@jeffeverhart 9 лет назад
Junior Auxiliary of Eunice Are you running the script from the editor or submitting a test form? You have to submit a test form to actually test this script; You can't run it from the editor. Let me know if the error persists after submitting a test form.
@juniorauxiliaryofeunice2729
@juniorauxiliaryofeunice2729 9 лет назад
Jeff Everhart Hi Jeff, thanks for replying. If by submitting a test form you mean going through and submitting information through the live form link, then yes I have done that.
@jeffeverhart
@jeffeverhart 9 лет назад
Ok, do you have the errors set to send immediately? And did you configure the triggers correctly based on the video?
@juniorauxiliaryofeunice2729
@juniorauxiliaryofeunice2729 9 лет назад
Jeff Everhart Yes, sir! I followed your video to the letter. Am I not defining the spreadsheet correctly? I know you said that the "e" means the event parameter, AKA when the form has a new entry, but maybe there's something I missed. Also, does it matter if my spreadsheet has more data than is used in the script? Or if I've made that entry on the form a required entry? When I click the debugging button on the script editor, it specifically seems to have a problem with the e.values[1] (etc.) portion of the code.
@jeffeverhart
@jeffeverhart 9 лет назад
No, everything in your code looked good, except you need to delete the first plus sign (+) in front of RunnerName in the message variable. Your spreadsheet can have as much extra data as it needs since we are only asking for those two values in the script. The debugger will always throw that error since we didn't have an event (form submission) and thus no values. Last formality question: Is the script in the spreadsheet or the form? Needs to be in sheet. Can you share the sheet with me so I can take a look? Can't promise it will be tomorrow, but it should be quick, busy week at work :)
@pase121
@pase121 9 лет назад
Hi great video, for some reason Im not receiving a confirmation email after implementing the script. Ive actually successfully done it before but for some reason its not working this time. Below is the code I used, maybe you can catch a mistake Ive made. Thanks function myFunction(e){ var timestamp = e.values[0]; var firstname = e.values[1]; var MDlocal = e.values[6]; var userEmail = e.values[89]; var demodate = e.values[83]; var demostart = e.values[84]; var demoend = e.values[85]; var subject = "Demo Report Confirmation"; var totalhours = e.values[86]; var message = "Hello " + firstname + ", this email confirms that on " + timestamp + " you submitted a demo report for " + MDlocal + ", which occurred between " + demostart + " and " + demoend + " for a total of " + totalhours + ". REMEMBER: It is your responsibility to retain all confirmation emails in the event they are required as proof of time submitted."; MailApp.sendEmail(userEmail, subject, message); }
@pase121
@pase121 9 лет назад
Found the problem, miss counted the columns in the spreadsheet which threw off the the variables in script. Forgot to count the first column as zero like your instructions said. Thanks for the instructional video, this was great!
@jeffeverhart
@jeffeverhart 9 лет назад
Pasaihou Sey Thanks for the kudos! Yes, zero indexing can be tricky at first. I'm glad everything seems to be working for you. Cheers! JE
@indiankidsupertoys8907
@indiankidsupertoys8907 9 лет назад
Hey Jeff, I am new at this and found your video to be quite useful to start my adventure As it was y first attempt I did everything you had said here but I did not get any email here is the Code. The Test Form was here - docs.google.com/forms/d/1fRHf6LMdA7z8MuBjdu4cubA4wnUz1jQvUQoHk3L8oWA/viewform function myFunction(e){ var userName = e.values[1]; var UserEmail = e.values[2]; var date = e.values[3]; var Subject = "Form Submitted"; var message = "Thank you, "+ Name + "For Choosing Mango Routes " + date; MailApp.sendEmail(UserEmail, Subject, message); }
@jeffeverhart
@jeffeverhart 9 лет назад
Your code looks fine. Did you set the triggers the way that I did in the video? Also make sure to set error notifications to send immediately, so that way we have some additional info to go off of if it fails. Check the triggers one more time and make sure that the code and triggers are housed in the spreadsheet of responses and not the actual form script editor. Let me know how it goes. Cheers, JE
@pewpewpops
@pewpewpops 9 лет назад
Dude, how do you not have more subs? Thank you Jeff:) I have not tried this out just yet but thank you for all the explanations! If I have questions can I ask you? To all my G+ subs please check out Jeff Everhart channel and give the man a sub!
@pewpewpops
@pewpewpops 9 лет назад
Can you (me) use this to do the following? I want to have a user click on a link that takes them to a page (on my website) that will let the user put in there email address (I want to keep there email address for later to update them on news, new content, etc etc.). Once they put in there email address, it will automatically send the user a custom email with a PDF.
@jeffeverhart
@jeffeverhart 9 лет назад
HomeScienceIdeas.com Here is the tutorial I promised: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FzBQZAhjHeI.html I know you'll bump into limits, but this should help get you started. Let me know if I can help you look at some code. JE
@alenngk
@alenngk 9 лет назад
Script function not found: MailResult Edit: code here prntscr.com/6l78of It's that simple, there must be some little thing. I have a table with a different name, but is attached to the form, but I just can not get the value of it, I do not know, but thx.
@jeffeverhart
@jeffeverhart 9 лет назад
Not sure what you mean by this error. The example script does not use the MailResult function anywhere. Can you post the whole script you're working on?
@jeffeverhart
@jeffeverhart 9 лет назад
Huh, that looks right. Did you put it in the script editor attached to the Google Form or the Google Sheet? It needs to be attached to the spreadsheet.
@alenngk
@alenngk 9 лет назад
It is sending errors on my mail when I edit form so yes I gues.
@jeffeverhart
@jeffeverhart 9 лет назад
Alenn G'Kar I think you should just need to move it to the spreadsheet.
@alenngk
@alenngk 9 лет назад
prntscr.com/6llx6e Ok I have new error: Can't read values from skript rows... Watched your old post and there is the same error when I edit form so what is off?
@ventase-tronics6686
@ventase-tronics6686 9 лет назад
don´t work values not define
@jeffeverhart
@jeffeverhart 9 лет назад
Ventas e-tronics Please look at the comments in the threads below. You need to submit a test form since there are no values when you run the script from the editor.
@ventase-tronics6686
@ventase-tronics6686 9 лет назад
Jeff Everhart thanks for responding , look this is the code is simple, it should work is not so: function myFunction(e) { var nombre = e.values[1]; var email = e.values[2]; var subject = "hola señor"; var body = "esto es una prueba"; Mailapp.sendEmail(email, subject, body); } I'm doing it in gmail is Spanish, influences what something ?, the form directly from the link position not from the editor This is error when send to email:myFunction TypeError: No se puede leer la propiedad "0" de undefined. (línea 2, archivo "Código") thanks I hope you can help me
@jeffeverhart
@jeffeverhart 9 лет назад
Try MailApp instead of Mailapp in your code. Both Mail and App need to be capitalized. Let me know if that works.
@ventase-tronics6686
@ventase-tronics6686 9 лет назад
Jeff Everhart equally, the problem continues .Thanks for helping
@ventase-tronics6686
@ventase-tronics6686 9 лет назад
Jeff Everhart function myFunction(e) { //var fecha = e.values[0]; //var nombre = e.values[1]; var email = e.values[3]; var subject = "hola señor"; var body = "esto es una prueba"; MailApp.sendEmail(email, subject, body); }
Далее
best way out of the labyrinth🌀🗝️🔝
00:17
Просмотров 1,4 млн
Send Confirmation Emails with Google Forms
9:31
Просмотров 308 тыс.
Email Notifications for Google Forms
15:32
Просмотров 1,6 тыс.
Google Forms - Google Drive's Hidden Gem
13:37
Просмотров 494 тыс.
Google Forms - Creating Quizzes and Analyzing Data
8:55
How to Use Google Forms to Collect Data
19:24
Просмотров 266 тыс.