Google Apps Script - Send Email from Sheets Custom HTML Template 1 Custom Font Email

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 พ.ค. 2024
  • One of the most commonly asked for Google Apps Script Projects is How to Send custom HTML emails using Apps Script. This lesson will demonstrate how to code in Google Apps Script and create functionality to send custom HTML templated emails to a list of users within your Google Spreadsheet data. Also updating the spreadsheet data.
    100+ Google Apps Script Example Projectswww.udemy.com/course/course-a...
    Complete Apps Script Course www.udemy.com/course/apps-scr...
    Source Code is at
    github.com/lsvekis/Google-App... Course content web development and web design courses with coding examples and source code for the lesson content. Source Code is available within my Github account. Lessons posted are designed to help students learn more about a specific topic related to modern web development and applying code.
    Laurence Svekis is a professional top selling course author having instructed over 1 Million students both online and in person. Laurence Svekis is a Google Developer Expert specializing in Google Workspace automation using Google Apps Script Code.
    Check out my Website for more details at basescripts.com/

ความคิดเห็น • 39

  • @chuckf5540
    @chuckf5540 7 หลายเดือนก่อน

    Hi Laurence,
    Great tutorial - very clear and understandable. Everything work as advertised and I've learned a lot about object oriented programming.
    I did have an issue with htmlBody vs htmlbody but your trouble shooting techniques works great.
    Thanks again - I will continue this series with much excitement,

  • @Katsiarina1
    @Katsiarina1 ปีที่แล้ว +1

    Love that, going to try it out at work 👍🏻

  • @user-tk9uy8iq4g
    @user-tk9uy8iq4g 5 หลายเดือนก่อน

    Hi Laurence,
    It was really helpful and you explained from a layman's view which made it very easy to understand each and every line of syntax.
    But is there any way to keep a separate button to send the mail for all the mails together at one click?

  • @HarpreetSingh-sm8vr
    @HarpreetSingh-sm8vr 8 หลายเดือนก่อน

    btw if i want to send email only for last row or when there is new data in sheet,how can i send to that last row only .

  • @boredomindex3353
    @boredomindex3353 ปีที่แล้ว +1

    Hi Laurence,
    Thank you for the excellent tutorial.
    Btw, how do we add the email subject dynamically? Let's say I have an extra column with subject lines.

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  ปีที่แล้ว +1

      Its in the mailApp Service sendMail() you can also do it in the options as subject which provides more flexiblity.

  • @hafsaadil7930
    @hafsaadil7930 8 หลายเดือนก่อน

    Hey Lau, I want to inquire about the execution time run out for approver I have added all the codes as you’ve mentioned but still I’m getting this error ? Can you please explain

  • @ex3d
    @ex3d 2 ปีที่แล้ว +1

    Excellent content 11/10

  • @c.nastassi
    @c.nastassi 2 ปีที่แล้ว +1

    Hi! Thanks very much for the video. I used the code and it works perfectly. I was wondering, what should I change in order to send all the emails at the same time? I guess it is something related to the getActiveCell but the truth is that I do not have a HTML background and I am not sure.

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  2 ปีที่แล้ว

      You can send lots of emails at once, keep in mind there are limits and the apps script server can time out on scripts that are running too many processes at once, this depends on the server load and will vary

  • @PartTimeHero77
    @PartTimeHero77 2 ปีที่แล้ว

    Thank you for the video. I have a couple of questions for you. What if I wanted to also send an email for the "NO" answer? What if I wanted to send it from. The Gmail mail function without the HTML? Thank you again

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  2 ปีที่แล้ว +1

      Yes within the code you can send the email by applying a condition statement. You can send text based emails of HTML emails with MailApp class

  • @HarpreetSingh-sm8vr
    @HarpreetSingh-sm8vr 8 หลายเดือนก่อน

    i want to send email only when there is new data in sheet,i mean to last row of data in sheets rather tha i dont want to start from begining to end. want to send only last row only. How can i do

  • @thomasbihn
    @thomasbihn ปีที่แล้ว +1

    A couple things I noticed - 1. Tools didn't have Script Editor, but did have Apps Script as a menu option. 2. Next to Debug is "No Functions" I didn't see how to get onOpen to test it without exiting the spreadsheet

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  ปีที่แล้ว

      The sheets changed its now under extensions, works the same way. The drop down of functions should be the same for run and debug.

  • @TheKirbyn
    @TheKirbyn 2 ปีที่แล้ว +1

    Hi, I have an html template file and in the paragraph I need to add a variable that is defined in my google app script. How do I pick up that variable?

  • @calebmackey5529
    @calebmackey5529 2 ปีที่แล้ว +1

    How did you popluate the "yes_no" button options, mine will not populate and when it is manually typed in it gets an error message.

  • @dimitrisvoudouris
    @dimitrisvoudouris ปีที่แล้ว +1

    I would like to ask if it is possible to send emails with the ability to select the sender, that is, I have 100 email addresses but I want to send to two specific ones

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  ปีที่แล้ว

      Yes you can customize the script to send to specific address from a list, use an array for the list and compare it to the full list if you want.

    • @dimitrisvoudouris
      @dimitrisvoudouris ปีที่แล้ว

      @@LaurenceSvekisCourses thank you very much

  • @taylorpearson299
    @taylorpearson299 ปีที่แล้ว +1

    Hi I am attempting to follow this video. I have done the code just like you have but when I try to run the script to send the email it does not send. I try to debug it and run in the apps script but there are no errors. What am I missing that it does not send the email? I am attempting to get it to send an email when someone marks something as approved in the spreadsheet.

  • @sanjushow2017
    @sanjushow2017 2 ปีที่แล้ว

    is it possible to add one column for PDF attachment.?

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  2 ปีที่แล้ว

      Yes you can send the PDF with Google Script and add multiple attachments

  • @NarenSushma
    @NarenSushma ปีที่แล้ว +1

    'Exception: No HTML file named temp was found' is what I am getting when I run it. Could you pls help me out with this. Thanks.

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  ปีที่แล้ว

      You would need to create the file by that name to reference it within the code.

  • @fakeaccount3415
    @fakeaccount3415 2 ปีที่แล้ว +1

    Do you know how to format time in html. It always shows as eastern time bla bla

  • @BLLUUEES
    @BLLUUEES 2 ปีที่แล้ว +2

    How many mail can I send?

    • @BLLUUEES
      @BLLUUEES 2 ปีที่แล้ว +1

      !!

    • @BLLUUEES
      @BLLUUEES 2 ปีที่แล้ว +1

      and can i use it for email marketing , thank you sir

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  2 ปีที่แล้ว +1

      There are limits it depends on your Google Account. I wouldn't suggest it for a mass emailing as there could be blocks in place.

  • @ehsan.1015
    @ehsan.1015 2 ปีที่แล้ว +1

    When I press run it shows this: Exception: Cannot call SpreadsheetApp.getUi() from this context.
    onOpen @ Untitled 4.gs:2.
    Can someone help me out pls.

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  2 ปีที่แล้ว

      the ui is only with bound scripts not standalone. the error is that there is no ui available

    • @thomasbihn
      @thomasbihn ปีที่แล้ว +1

      @@LaurenceSvekisCourses How do you make it a bound script? There was no script editor menu for me when trying to follow allong, just Extensions - > App Scripts. Thanks