Learn Google Apps Script Project Lesson Create PDF from Docs Using Google Sheet Data send Emails

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 มิ.ย. 2024
  • Google Apps Script PDF maker from Google Doc template. Send PDFs as Emails
    Setup files and folders
    Add data and set up the template Doc
    Create the Script - Connect to Spreadsheet data
    Get the data from each row within the sheet data
    Select the Google Doc Template
    Populate the Doc with Sheet Data
    Set the name of the document
    Create and send the PDF
    Update Row Column with Sent value
    Add to the UI
    Complete Project Script
    Get the source code at basescripts.com/google-apps-s...
    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/
    Subscribe - / @laurencesvek. .
    Tags and Keywords
    #AppsScript #googlesheets #workspace #accounting #finance #automation modern web design online course #onlinecourses #modernwebdesign #tips #appsscript #coding #codingtutorial #script #scriptinghelp #google #Viral #subscribe #helping #GoogleAppsScript #Gmail #Attachments #Spreadsheet #Automation #GmailAttachments #GoogleAppsScript #EmailProductivity #Automation #SpreadsheetLogs #AttachmentDetails #TechTips #ProductivityHacks #GoogleDrive #GmailSearch #GoogleAppsScript #Spreadsheet #Email #Automation #Iteration #subscribe
    #GoogleSheets #GoogleAppsScript #CustomUIMenu #SpreadsheetTips #ProductivityTips #TechTutorial #CodingTutorial #BeginnerFriendly #StepByStepGuide

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

  • @ivanoleksii284
    @ivanoleksii284 19 วันที่ผ่านมา

    Above and beyond Thank you a million !!!

  • @user-uy5cu4xx8g
    @user-uy5cu4xx8g 9 หลายเดือนก่อน +1

    Dude, you're amazing! I've spent the entire day revising your video and its really gonna help me at work. Cheers from Brazil. Keep up the good work!

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

    This was absolutely amazing. Thank you for this. Subscribed for LIFE!

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

    Thanks, a wonderful lesson.

  • @VaHuPeJu_Mesei
    @VaHuPeJu_Mesei 4 หลายเดือนก่อน +1

    Thank you gratefully. This is exactly what I needed.

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

    Thank you for sharing it, this is super useful 👍🏻

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

    Thanks for the amazing lesson!!!! Appreciate alotttttttt!!!!

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

    Thanks for the good information. We look forward to the continuation.

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

      thank you for watching please let me know if you have any questions

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

      @@LaurenceSvekisCourses First of all, thank you for your interest. I have a personal project that I want to do. A small Tattoo studio needs a management program. I want to add an appointment to google calendar with fields such as Customer Appointment information (Name Surname, Country, Hotel, Tattoo Type, Tattoo Artist, Tattoo Designer, Payment Method, Fee, Deposit, Free Service etc.). I also want to print the appointment information and the contract on a single A4 page and give it to the Customer. And I want a section to be made for calculating the percentage earnings of Tattoo Artists and Studio staff.
      Is it possible to manage this application from a web application using google script? Can you make a video about it?

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

    thank you so much for this :D

  • @vegasrunaway
    @vegasrunaway 18 วันที่ผ่านมา +1

    I'm trying to tie this to a form so that the email from the sheets goes out upon form submission. Is there simple code to add to sheets or should I start over and code the form?

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

    Thanks for share 👍👍👍👍👍

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

    great tutorial, keep doing pls ..

  • @yanino5761
    @yanino5761 3 หลายเดือนก่อน

    Thank you so much
    How can I increase the 6 minute execution limit in Google Apps script?

  • @MangJuArnz
    @MangJuArnz 11 หลายเดือนก่อน +2

    Hi, Laurence! Your help is greatly appreciated. Question though, how can I make a line spacing between sentences in message.body? I want to make a sentence/paragraph next line below the first sentence with a single line space.

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  11 หลายเดือนก่อน

      You can add a blank line or change the setting of the doc

  • @stolzmeadglobal
    @stolzmeadglobal 2 หลายเดือนก่อน

    Okay, this video is assume. I have one question... could the code be set so IF the Sheet gets a new submission, it automatically runs the Email Out script? Or does the Email Out have to be run manually?

  • @blazed-space
    @blazed-space ปีที่แล้ว +1

    Epic! One can utilize this to create server less erp/CRM solutions for business without breaking the bank.

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

      Yes thats the best thing about it, its a free server that has a tonne of built in services and processes on the ready. Thats actually how I ended up starting with Apps Script, a simple app they client had no server.

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

    Thank you so much for your hard work. If you don't mind is there a way to add a link of the pdf file created next to the sent date.

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

      Yes you can get the URL of the PDF and set the link as needed.

  • @MatheusSilva-qm3ph
    @MatheusSilva-qm3ph ปีที่แล้ว +1

    Very cool. A question how to do not repeat messages already recorded ?
    Please save em from this code.

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

      Sorry I don't understand the question

    • @MatheusSilva-qm3ph
      @MatheusSilva-qm3ph ปีที่แล้ว

      @@LaurenceSvekisCourses I wanted to know if it is possible to save data in goolge sheets without repeating what has already been recorded. Would you help me? Thanks.

  • @anurag9392
    @anurag9392 10 หลายเดือนก่อน

    Thanks for the useful video.
    In this process, excell data creates the doc file and simultaneously pdf file.
    However I have a project in which i have google sheet having a script which creates the doc file, filled with the sheet details. And second script in the doc template that is save as pdf and send on mail.
    Every time sheet is filled and doc is created and the save and send email script is run it asks for permission for every new doc file. How to resolve that? So that after checking doc file it directly save as pdf and send on email without asking everytime permission.
    Plz help me.

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

    Thanks for making our work easier. I do have an issue though, whenever I script "Hi,${row[3]}." in the messagebody for the email, it won't populate. and its text is red. any tips how to resolve? Thanks in advance.

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

      You need to use the backtick for template literals, or for quotes you need to break out of the string and use the +

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

      @@LaurenceSvekisCourses thanks, I solved it thru the link provided. my script is now fully functional. this is new to me and i learn ir overnights..

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

    Hello, I am trying to automate a template using a spreadsheet but I seem to be having issues populating multiple fields. I am able to body.replaceText once but when I try to add the others it won't work. How do I know which row number to use?
    thank you.
    Example:
    body.replaceText('{Employee Name}',row[1])
    body.replaceText('{Field 2}',row[?]);
    body.replaceText('{Field 3}',row[?]);

  • @usedelectro5648
    @usedelectro5648 10 หลายเดือนก่อน

    I cannot get the body.replaceText to work, any ideas?

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

    Is there a way to populate the new Google sheet document instead of the date for sent column?

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

      Yes it will take whatever content is posted to the cells in setValues()

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

    If i make 5 doc from the spreadsheet, How to auto merge them?
    Thank You

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

      Sorry I don't understand, why would you not just create the one doc why 5 and then merge?

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

    Is it possible to modify the data in the spreadsheet using vanilla JavaScript?

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

      Yes you can, you can use the webapp and set a doPost() to retrieve the JavaScript request Keep in mind that this opens the sheet since its frontend code and the URL will be visible

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

      I have some other videos that show how to setup the JavaScript connection to Apps Script web app

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

    How do you do the same thing, except instead of having it automatically emailed, it's saved to email draft instead

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

      For draft emails you need to use the gmailapp service not mailapp

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

    Hi! I keep getting this error message and I can't figure out what I've done wrong - TypeError: Cannot read properties of null (reading 'getDataRange')

  • @monidhariya4002
    @monidhariya4002 5 หลายเดือนก่อน

    I have salary slip of employee n data i want to learn

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

    Hello Sir Can You create a simple CRM Like asana or Google Streaks by using a google app script, please tell us as soon as possible

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

      I have several lessons on similar content, although a full CRM is a lot of work

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

      @@LaurenceSvekisCourses Can You Please Share a simple blank View In Gmail Like for Example Inbox in Gmail has its own view by using the app script,or please share references by which I can try to do it myself

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

    Hi, sometimes the script runs and sometimes just shows in the log "started running" and after few seconds "stopped running"

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

      It depends on the task, there is a timeout of 15 minutes on scripts also depending on the server load

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

    Thanks for ur tutor bro. But i have problems when we fill email not in sequence, why is not sent, it says "Failed to send email: No Recipient". for example we have 6 data, first to fourth is running like u did because is sequence, but if we jump to sixth, which is fifth data is empty, sixth row is not send and error message come out. How we fix this so we can fill the data not just in sequence? I really apreciate for ur answer

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

      Generally you would see that type of error if the email was not a valid one, check if you have whitespace also try to prefill the email and test to see if it works.

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

      @@LaurenceSvekisCourses yes, if email is not valid, it cant be sent. But the problem is, if we jump to another row, like tenth row. first to fourth row, we fill data and valid email like u did is running, but fifth to ninth is empty, completely blank row,and we fill data and valid email in tenth row, is not running is not sent, but if i fill 4 to 9 again with valid email, tenth row running again and sending. why i cant fill any position of row that i want? why cant be any blank row? why must in sequence?
      Really appreciate with ur answer🙏

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

      i figure it out, just put this
      if (email == "") return;
      before mailapp
      thanks anyway bro

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

    Sir {FIRST}{LAST} in docs not working . Please help.header1=heading.toUpperCase()
    body.replaceText( '{${header1}}'.row[1] I think problem.

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

      if you use template literals its a backtick not a single quote `

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

      @@LaurenceSvekisCourses SIR PERFECTLY WORK . '{${header1}}' THIS WAS MY MISSTAKE .THANKS .

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

    I get an error when I run the script and it says,
    " Exception: The document is inaccessible. Please try again later.
    (anonymous) @ Code.gs:14
    sender @ Code.gs:12 "
    How can I solve this problem ?

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

      Its possibly a permissions issue

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

      @@LaurenceSvekisCourses Thank you and I have sorted out the issue

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

      I had the same issue. It must be a google doc file. I had a word docx, which made this error.

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

      @@xavierswiss yeah I got it, that was the error