Google Sheets - Send Emails Using Apps Script JavaScript MailApp Tutorial - Part 12

Поділитися
Вставка
  • Опубліковано 17 жов 2024

КОМЕНТАРІ • 248

  • @chezlineriley6913
    @chezlineriley6913 7 місяців тому +1

    Simply speechless! I've never done Java Script before but I really wanted to understand what you were doing so I kept scrolling back to hang on your every word! 🤣 Then I was able to update my script until I finally got it and was able to tailor it to my needs. Thank you so much. New subbie! 👏👏

  • @madanms17
    @madanms17 3 роки тому +3

    Hi, Thanks a lot. I watch your channel for all my problems in google sheets. Because I think this is the best channel related to google sheets.

  • @dycast646
    @dycast646 3 роки тому +3

    Thank you so much! Just a reminder, you might replace "MailApp" to "GmailApp" in order to send the email without errors.

  • @cheewurz
    @cheewurz 4 роки тому +1

    I have been over & over the the Code and can't figure it out. I have even put it aside for a time & come back to it with a Fresh Perspective and I can't get beyond the Syntax Error. Got Me! All your other Lessons I have gotten to Work. This is the only one that has Stopped me...hummmm

  • @tomdevisser649
    @tomdevisser649 4 роки тому +1

    That button functionality is really cool. Nice when writing scripts for people who don't know how to run them!

  • @ankitadutta619
    @ankitadutta619 2 роки тому +2

    I have no words to thank you. The way you provide solution to my problems everytime is mind-blowing. Whenever I face any problem in spreadsheet I have no other options other than you. Thank you once again. 👍

  • @csprgsio
    @csprgsio 6 років тому +11

    You just helped me a ton! Best apps script /js tutorial I've ever watched! I'll watch your tutorials forever if ya keep making them! Keep it up!!!!

  • @huynguyen7048
    @huynguyen7048 5 років тому +3

    Thank you for your clear explanation. Best instructor ever. Looking forward to watching more script tutorial video from you

  • @MartinTobonV
    @MartinTobonV 10 місяців тому

    Amazing content! Would this still be possible at scale if I want to add my emails to an email I would like to forward? For example, I want to send my customers a custom reminder on top of an alert they have already received.

  • @emmaoben4436
    @emmaoben4436 3 місяці тому

    Thanks for this, could I use this guide to mail merge into a table format into documents?

  • @royellison940
    @royellison940 Рік тому

    Thank's for this video it works great for my needs, is there a way to add more than 1 cell for the template? I don't yet want to go down the HTML road but would like to just add 2 more cells to the template

  • @Irfan9191111
    @Irfan9191111 4 роки тому +12

    Great tutorial, super...!!!
    how can we add attachments?

  • @innocentnamdialinta7440
    @innocentnamdialinta7440 2 роки тому

    Thanks a lot. This tutorial was really helpful!! may I ask a question:
    How can I automate a scheduled time to send out the emails?

  • @suhelmujawar938
    @suhelmujawar938 5 років тому +2

    Thank you so much! ......Can we do it with the help of date? ...It means we can send automatic email on a specific date.

  • @gonzaloalbert3538
    @gonzaloalbert3538 3 роки тому +4

    This tutorial is just awesome. Works perfectly and it's so well explained you actually understand and learn what you are doing. Great Job. Thanx a lot. Suscribed to your channel right away.

  • @PlanlosAmWerk
    @PlanlosAmWerk 2 роки тому

    Hi, thanks for this very easy to follow video! Have done this in excel, but new to google sheets. Do you know if I can somehow set it up so the script runs for example every Sunday night automatically instead pressing the button?

  • @erikaknollenberg4558
    @erikaknollenberg4558 2 роки тому

    This was perfect. Any ideas for how to send to multiple recipients. I have figured out how to actually send to multiple emails by having each of them listed in the currentEmail but not how to have a different salutation for the respective email address.

  • @ivanurbina2422
    @ivanurbina2422 Рік тому

    That was an awesome tutorial! Learn a couple of tricks here. Thank you.

  • @sitihanirahbintirahmat3911
    @sitihanirahbintirahmat3911 5 років тому +1

    Thank you for the video. Its help me a lot. But the email will only sending out when I run the script. Else it won't send the email. It will be nice if you can help me out to send it automatically to the last sender of the form submission. Means, for the last row of email address. Would you help me?

  • @lafamillecarrington
    @lafamillecarrington 7 років тому +2

    Thanks for these really useful tutorials. Is it possible for you to add the text of the script that you have written after each tutorial?

  • @rkhyami
    @rkhyami Рік тому

    This is incredibly helpful and amazing. May I ask what wold the script look like if I want to send email not to all but to the list based ona value of a cell. I would like to send a bulk mail if the date value in a column is less than three months from today. I would much appreacite it if you can kindly share the code. will make my day!

  • @PositiveVibesCoach
    @PositiveVibesCoach 4 роки тому +6

    This has helped me a ton; But what i want is to include attachments in the Emails; Any help on that?

    • @shaundolk4873
      @shaundolk4873 3 роки тому

      Agreed, adding attachments would be a game changer!!

    • @sam_safari
      @sam_safari 3 місяці тому

      @@shaundolk4873 its possible as well

  • @cheewurz
    @cheewurz 4 роки тому +2

    Sir...I found the Problem.
    I Commented Out Line 30 and everything seems to Work Properly!

  • @nadlanation
    @nadlanation 2 роки тому

    Thanks the great video. I have a question. If i need to send an attachment (from a google drive url) that is also in one of the columns in the sheet. how can i do it?
    thanks

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      // Send an email with two attachments: a file from Google Drive (as a PDF) and an HTML file.
      const file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz')
      const file2 = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz')
      MailApp.sendEmail('mike@example.com', 'Attachment example', 'Two files are attached.', {
      name: 'Automatic Emailer Script',
      attachments: [file.getAs(MimeType.PDF), file2.getAs(MimeType.PDF)]
      })

  • @dwightaguinaldo3421
    @dwightaguinaldo3421 2 роки тому

    After creating this project, is there a way to implement the script to another brand new spreadsheet rather than copying and pasting it? sort of like importrange? Thanks!

  • @kashbapodara
    @kashbapodara 6 років тому +1

    Hello,
    Thank you so much for all the script related videos. It did help me. I would like to request you to prepare a video for using script to lock automatically the range after entering data. Also to loop this process over few sheets in the same spreadsheet.
    Your quick response would be highly appreciated.

  • @boyvalentinositorus3689
    @boyvalentinositorus3689 3 роки тому

    Hi, your tutorial works fine. 1 question please: how if i want to send email to a person ONLY in line 2 or line 3 ? or even ONLY data from line 10 ?

  • @iloveutubealotandmor
    @iloveutubealotandmor 6 років тому

    Wonderful video and simple way of explanation that makes you understand the concepts easily.

  • @djimidjango1357
    @djimidjango1357 3 роки тому

    THANK YOU VERY MUCH! I am planning to enroll online on your website! Quick question on this though, how can we limit sending emails to those new entries only?

    • @djimidjango1357
      @djimidjango1357 3 роки тому

      What i mean is to NOT repeat sending emails to old entries; Only to new ones. Thank yoU!

    • @djimidjango1357
      @djimidjango1357 3 роки тому

      Im refering to 0.52 of you mentioned. Hope you share this. You weren't able to discuss this in the video.

  • @DerekMorgan1
    @DerekMorgan1 6 років тому

    Thanks these tutorials are very good. I like that you make mistakes and then show us how you fix them during the videos 👍

  • @HaszloD
    @HaszloD 4 роки тому

    Hi, Your tutorial is great, but i have question for script sending emails.
    I want to know that it's possible to add somebody it's will be 2 persons to CC - 1 person its the person who edit this sheet and the second is permanently, how can i do this?
    And the second questions - 15 people will have access to my sheet, they gett in new write in the new row, and every new write in the new row my script must send an only one email with the new write, that earlier write i don't want to see in email only new write , how can i do this?

  • @Amirpy.
    @Amirpy. 4 роки тому

    it was a great tutorial. thank you. one question. is that possible to reply this email to the previously sent email?

  • @lutfiandre4371
    @lutfiandre4371 3 роки тому +1

    Hello, thanks for the knowledge. it helps a lot.
    I would appreciate if you could help me to solve the replace function which is not working.
    it's written: templatetext.replace is not a function
    thanks in advance

    • @dhimassetyapamungkas9160
      @dhimassetyapamungkas9160 Рік тому

      me too but. replace(); only work in string. getValue(); return string otherwise getValues(); return array. may be you take that "s"

  • @mchangflor
    @mchangflor 4 роки тому

    I have a question. This sends to one recipient. What is the additional code I need to add to email a second or third recipient (ie. CC'd) for the same email being sent?

  • @michaelhofmann2925
    @michaelhofmann2925 3 роки тому

    great tutorial, thanks! Will be more than usefull for my research of internship!

  • @socarquality1912
    @socarquality1912 2 роки тому

    Hi. Thanks for sharing. But how can i copy script content for use. if you help in this regard would be happy. thanks in advance

  • @radovanbierens1946
    @radovanbierens1946 4 роки тому

    Thanks for your tutorial. Thanks to you I was able to make my very first script :-)

  • @patrickstewart3883
    @patrickstewart3883 5 років тому

    HI, I just wanted to say Thanks for the excellent videos. I am enjoying them immensely and building a pretty serious script.

  • @davidmcnulty6681
    @davidmcnulty6681 3 роки тому

    Hi, I am new to google sheets and script have a sheet that I would like to get an email notification if any cell in column V2:V is changed or edited, can you tell me how to do this?
    Ta

  • @NeerajDKumar-el6jy
    @NeerajDKumar-el6jy 5 років тому +9

    Hay, Thanks a ton for such a simplified tutorial. It makes value a lot. Is there a way we can send mail as HTML instead of text ? Thanks a lot once again for your all the tutorials (Y)

    • @jaleahmad3248
      @jaleahmad3248 3 роки тому

      ua-cam.com/video/H7WFkt6J4rs/v-deo.html

  • @stephenrumph7476
    @stephenrumph7476 4 роки тому

    I notice while using this function that my for loop only reads the lines that have data inputed. Is there a way to tell the loop to run even if there is no data in some cells? I tested this by putting in my email to all the cells and it worked, but when I left a blank cell underneath then put another email in the cell below that, it stopped running and only sent what it could read.

  • @Freeswing
    @Freeswing Рік тому

    Awesome stuff, great tutorial again. Thanks thanks thanks.

  • @RahulSharma-uj7cr
    @RahulSharma-uj7cr 3 роки тому

    Great video. Can i ask you for little help. as in this video you started for loop from 2 to LR which is last row. it always start from 2 row and so on. can we make it fast using array or for each loop or map method if possible so that it can run faster. pls help

  • @ksecurity73
    @ksecurity73 4 роки тому

    Hi,
    I made the app script to send mail(mailApp) in google sheet. But anoymous one who does not have google account cannot execute the app script mentioned.
    How can get anoymous to send mail Apps in shset?

  • @tanyongsheng4561
    @tanyongsheng4561 2 роки тому

    Thanks so much, great tutorial. Btw, is it possible to send email with attachments?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      // Send an email with two attachments: a file from Google Drive (as a PDF) and an HTML file.
      const file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz')
      const file2 = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz')
      MailApp.sendEmail('mike@example.com', 'Attachment example', 'Two files are attached.', {
      name: 'Automatic Emailer Script',
      attachments: [file.getAs(MimeType.PDF), file2.getAs(MimeType.PDF)]
      })

  • @ankur5843
    @ankur5843 3 роки тому

    I need scripting for "multiple attachments on mail by google script". I will have to take File ID from google sheet. But unable to attach on Gmail. I have searched many times, but no solution.
    Can U help?

  • @greatidealsevent8413
    @greatidealsevent8413 5 років тому

    Based on this script, how do I insert attachment in the email sent out? My current workaround is insert the Google Drive link in the template text. But I hope there is a much decent way. Thanks in advance.

  • @cheewurz
    @cheewurz 4 роки тому

    Just wanted to say your Invoice Video was Superb! But...there is a couple three things it should do and does not ;) Up to the Challenge?

  • @sudhandiramanisundaram4909
    @sudhandiramanisundaram4909 2 роки тому

    Thank you for the video. Its help me a lot

  • @beeleaveme
    @beeleaveme 3 роки тому

    is it possible to make sheets send emails without the button somehow automatically?

  • @sal2054
    @sal2054 Рік тому

    Great way of teaching! You sound bit like Khan Academy's Sal!

  • @remiteksolutions6328
    @remiteksolutions6328 2 місяці тому

    Hi I am looking for sending emails with attachment pdf preferably. Please help on that

  • @darshanapandya9241
    @darshanapandya9241 4 роки тому +2

    Thank you very much nice vdo

  • @labocuphealthlabourreahab
    @labocuphealthlabourreahab Рік тому

    Thanks a lot for your lesson 😊❤🎉

  • @ogcombatacademy
    @ogcombatacademy 4 роки тому

    Loving your videos so far. Helping me a lot as I'm new to Gsuite. How can you create timed triggers to send emails from sheets, when a particular data has not been entered at a particular time? Thanks

    • @ogcombatacademy
      @ogcombatacademy 4 роки тому

      Like, if a student haven't signed in at 10am, an automatic email is sent to them from sheets reminding them to sign in. thanks

  • @brandonlane3090
    @brandonlane3090 4 роки тому

    How do you set this up for a spreadsheet that is automatically updated? For example: When someone fills out a form and it's sent to the spreadsheet - so they can get emailed automatically

  • @programador1972
    @programador1972 7 років тому

    congratulations, the best of the best.
    Looking a lot on the internet and I find this channel wonder , I'm going to learn a lot.

  • @Tacka4Fun
    @Tacka4Fun 6 років тому +2

    hmm, i wonder how to make this to work automatically without a button. For exampe mails would be sent if date is xxx or mails would be sent if certain text in certain cells would change.

  • @jhonirosales1257
    @jhonirosales1257 6 років тому +10

    Congratulations on the video. But I thought this script was unnecessarily complex. Could have focused on template for sending in HTML format including shipping if images. How about doing a next video? CONGRATULATIONS

  • @gaelbourdeau8071
    @gaelbourdeau8071 3 роки тому

    I made it. Thank you very much for your videos!

  • @dronie8782
    @dronie8782 4 роки тому

    hello, already you are doing a great job. I would like to send a notification email to myself and to the clients as part of my work. it's about product rental. example: I want to send an email with the following conditions: in a sheet google sheet a product must be returned to us on a certain date, if this date is not respected then I send a reminder email to myself and to the customer, if this date is respected then I do not send any email. my sheet has 3 columns date (product removal date, product estimated return date and return date). I am not a programmer. can you give me your help? thank you so much

  • @gaelbourdeau8071
    @gaelbourdeau8071 3 роки тому

    There is no way to directly connect the code to the spreadsheet? So that in this way I only have to write that I want to send the mail on the sheet and it is sent directly. Instead of going to the script and activating the code.

  • @andresarnas6844
    @andresarnas6844 5 років тому

    Hey thank you for this tips. I've got a question on this topic: is it possible to specify an hour in which mails can be sent automatically? I'd be grateful if so.

    • @giamar3026
      @giamar3026 5 років тому

      Hi!, did you find how to specify an hour? as i'm going to investigate how to do this. Thank you

    • @Mr.Kazanova
      @Mr.Kazanova 2 роки тому

      Add a trigger to run this function at the time of the day you want. Go File > trigger > at the right corner down hit the + button > choose the hours you want the trigger to run.

  • @MuhammadIqbal-bn3dv
    @MuhammadIqbal-bn3dv 5 років тому

    Is there any limits emailing by Google sheet and appscript?

  • @elgreg2011
    @elgreg2011 3 роки тому

    Thanks very very much. but I need to watch it again., ha ha ha👌👌👍👍

  • @ronyjoseph529
    @ronyjoseph529 4 роки тому

    Thank you for the video. Is it possible to sent emails other than from Google? 'Coz I am using Zoho Mail here.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому +1

      It is possible, but it will be very difficult.

    • @ronyjoseph529
      @ronyjoseph529 4 роки тому

      @@ExcelGoogleSheets thanks, I have got a solution that we can give a replyto option in the MailApp, so that's enough for me now. Is it possible to add a image as mail content? I want to add an image as signature.

  • @fabriciosouza408
    @fabriciosouza408 4 роки тому

    Man, thank you a lot ! I'm really learning with your videos.

  • @adityasvasisht4743
    @adityasvasisht4743 4 роки тому +1

    Hi, can you make a video on sending the google spreadsheet as an attachment in the mail in different formats such as pdf, xlsx, and CSV?
    Also if you could send it sheet by sheet using g-app scripts? Thanks
    Love your work BTW. Keep it coming! :)

  • @hannabudai273
    @hannabudai273 Рік тому

    I'm far from understanding what you are doing but based on that I was able to create a script that sends the google sheet file via email. However I'm not able to figure out how could it send it in excel or cvs instead of pdf :( If anyone can help that would be awsome.

  • @VickiAllan
    @VickiAllan Рік тому

    Hi, i'm a little new to this so was trying with your example.
    This is what I have put in
    function sendEmails() {
    var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
    var lr = ss.getLastRow();
    for (var i = 2;i

  • @arpitdoshi
    @arpitdoshi 2 роки тому

    can you please make a video on sending invoice in Draft(Not pdf) from google sheet (with all borders and plain merged cells format)

  • @mme_3670
    @mme_3670 3 роки тому +1

    Best Video...

  • @Prashantdevada
    @Prashantdevada 3 роки тому

    How to send email by a drop-down list. ? ( Like I want to send email on only selection "registered")
    Pls explain. Actually I have a Student Query Report google sheet where we are put the students query. Now I wants when we register a student query, email send to be concern department. And then queries resolved email send to be student.
    Pls help in this.

  • @greatidealsevent8413
    @greatidealsevent8413 5 років тому +1

    On Form Submit, every time a user submits the form, the Sheet is resending emails to everyone in the list. It would annoy the persons who have received the email previously. How to solve? Sad.

  • @Mr.Kazanova
    @Mr.Kazanova 2 роки тому

    Thank you so much about all the amazing videos. You've changed completely my expectations from Google sheets! May I ask a question:
    How can I limit the number of emails send? I mean instead of if( (lr-1) >quotaLeft ) say if( (lr-1) > 10 ) as 10 mails per day. This doesn't work, is something I can do about this?
    Thank you again about these lessons!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому +2

      You would have to store the number of emails sent per day someplace and compare it to that number. It's not going to work by just simply modifying the number in your code.

    • @TanusMorken
      @TanusMorken 2 роки тому +2

      since 10 (your limit) = 100 (daily quota) - 90, you can use if( (lr-1) > (quotaLeft - 90) ) to limit your quota

    • @sam_safari
      @sam_safari 3 місяці тому

      @@TanusMorken this is perfect

  • @tooabrown5347
    @tooabrown5347 4 роки тому

    Hi there, amazing script. very useful. However I want to avoid sending duplicate emails once I run the script. Where and what additional script codes do I need to add??

    • @adrianfletcher8963
      @adrianfletcher8963 4 роки тому

      Go to the section that says improvements developers.google.com/apps-script/articles/sending_emails

  • @chamilvidanapathirana4193
    @chamilvidanapathirana4193 5 років тому

    Hi thanks for this video, i have created this and tested on my Android phone. but the button is not clickable. do you know if the button feature on sheets are compatible with Android version of Google Sheets? if not whats the alternative you think.
    Thanks

  • @julian.kollataj
    @julian.kollataj 4 роки тому +2

    Thank you for making this! :D very helpful!

  • @VineethMenonk
    @VineethMenonk 3 роки тому

    Wonderful SIR...Thanks A TON

  • @NeerajKumar-nz2xi
    @NeerajKumar-nz2xi Рік тому

    Dear kindly also make a video for invoice automation

  • @markoldfield966
    @markoldfield966 2 роки тому

    Good explanation but you will need to have it at 1.5-1.75 speed, else you could write what he says by hand.

  • @cheewurz
    @cheewurz 4 роки тому

    Why am I getting: Syntax Error: Unexpected Token 'else' (line 14, file "Code.gs")

  • @yeszification
    @yeszification 4 роки тому

    thanks for your tutorial. can you please show us how to send attachments on gmail using this script?

  • @ihgaming8885
    @ihgaming8885 6 років тому

    Very nice video. Subscribed!
    How do we put in the body of the email if it is a range from cell A1:C5, for example. And keeping the format. Appreciate the help

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому +1

      There is no easy way. You have to create HTML out of that range that will look like that.

  • @jobseekers2418
    @jobseekers2418 2 роки тому

    how it will work only for newly added emails not for the entire list

  • @sabitkarabayev9141
    @sabitkarabayev9141 4 роки тому

    Hi! Great lessons! How could be improved this script, when it immediately sends emails with last changes by email including these changes in email`s body?

  • @aklidahmed1344
    @aklidahmed1344 Рік тому

    Best 💯

  • @denicolas260
    @denicolas260 7 років тому

    Gracias por compartir sus conocimientos soy su fiel seguidor jajaja lo felicito

  • @hunterxq6305
    @hunterxq6305 5 років тому

    Can you help us making like custome order. From Google form with date, contact number and some detail. From spreadsheet we send to Google calender with various Gmail account.

  • @allenjohn5388
    @allenjohn5388 3 роки тому

    How to add cc using Mailapp? Can you please explain that.

  • @apocalypticbean
    @apocalypticbean 2 роки тому

    you're a legend

  • @samhamdan6500
    @samhamdan6500 6 років тому

    Hey mate .. thanks for the email.. But is there any script that allows you to send a attachement .csv file of the current active sheet to a email??

  • @ZahaWebConsultants01
    @ZahaWebConsultants01 6 років тому +1

    I am working on a Google Form and wanted to have the form data sent to an email. I wrote the following code which works well, however, the mail is sent from my ID irrespective of who submits it. How can I have the form send email from the submitter and not my address? Each time a form is submitted even by other users it shows my address in the From field. So basically the mail is being sent from my ID. Can we change it somehow to show it came from the submitter and not me person who made the form?

    • @puleng2658
      @puleng2658 6 років тому

      Hi, could you please share your code. Im stuck on this problem

    • @jeffreymorris8175
      @jeffreymorris8175 5 років тому

      This is not possible using Google App Scripts; you can change the "ReplyTo".

  • @himanshudayma5854
    @himanshudayma5854 Рік тому

    Can you please help with attachment of xlsx or csv

  • @jeremihlitao9346
    @jeremihlitao9346 6 років тому

    would it be possible to trigger this function by using checkbox in Google Sheet?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому

      Yes, but it would be impossible to explain in a few words.

  • @ayuekayuliintayani1370
    @ayuekayuliintayani1370 4 роки тому

    how about the code for send the data to whatsapp number when new data are inputed automaticly? pls help me.

  • @leonardotenaglia3502
    @leonardotenaglia3502 5 років тому

    Thanks , it working , i really appreciate your time!!

  • @hrithikrajprasad4371
    @hrithikrajprasad4371 4 роки тому

    HOW THE LINK CANNOT BE ACCESSED BY PUBLIC.... MADE google sheets and appscript public

  • @WheelieTruther
    @WheelieTruther 2 роки тому

    Is there a way for the script to ignore multiple instances of the same email in the original sheet?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      It's possible.

    • @WheelieTruther
      @WheelieTruther 2 роки тому +1

      @@ExcelGoogleSheets Managed to find a workaround by using a pivot table to filter what I needed and then pulled from that.

  • @hafizdzakimcd6943
    @hafizdzakimcd6943 5 років тому

    Hello , I Like your Tutorial Video. do you think Google Sheets can Send Message to Whatsapp ?