Google Apps Script: Creating Managing, and Automating Projects with Script

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2020
  • Google Apps Script: Creating, Managing, and Automating Projects with Script and Advanced Services, UI Options, Libraries, and Services. Includes Tips, Code Examples, and Debugging Techniques
    topics related to Google Apps Script. It covers Script Services, Advanced Services, UI Option, Mail Function, Properties Service, URL Fetch, Apps Script API Service, Script Editor, Debugging, Autocomplete, Navigation Menu, Libraries, Services, TH-cam API, Google Cloud Project, Deployment, and Web App. The topics include creating and managing projects, sending emails with attachments, updating deployments and libraries, and creating web apps. The text provides tips and code examples to help users better understand the concepts. Hashtags are included with each topic for easy reference.
    overview of Google Apps Script, including Script Services, Advanced Services, and the UI Option. It also covers the Mail Function, Properties Service, URL Fetch, and Apps Script API Service. The reference and samples tabs are suggested as resources for further information. Additionally, the article discusses creating a project and running functions within the Google Apps Script editor.
    The video tutorial shows how to use Google Apps Script to access and manipulate Google Drive documents. In test one, the video demonstrates how to create a Google Document with a script, and in test two, the video shows how to manipulate an existing Google Document using a script. In test three, the video shows how to get the active user's email address using the Google Session Service, which can be used to send emails using the script. The video highlights the importance of using logs for debugging purposes.
    How to send an email with a Google Document as an attachment using Google Apps Script. The script first gets the email address of the active user and the ID of the Google Document. The document is selected and renamed, if necessary. The document content is then retrieved as text and appended to the email content. The URL of the document is also retrieved and added to the email content. Finally, the Gmail service is used to send the email with the document attached. The script requires appropriate permissions to run.
    It also explains the new formatting options available in the editor, which include realigning and collapsing functions for easier reading. The article also touches on core features such as the ability to save, run, and debug scripts, as well as using logger log to output variable values.
    The debug function uses breakpoints to pause code execution and show errors on the right-hand side, and allows users to step back or over code to identify issues. The autocomplete function provides suggestions and information about available methods and classes as users write code, and shows errors with red underlines. Users can select suggestions from a dropdown list, and variables that are in use are displayed in black while unused variables are displayed in gray. Users can select suggestions from a dropdown list, and variables that are in use are displayed in black while unused variables are displayed in gray. The text also provides tips for disabling or ignoring error messages.
    There are pop-up windows that show auto-completes for variables and functions, including available string methods. The overview window shows information about the script, such as its creator, execution, and deployment. Users can make copies of the script, add stars to it, and remove it from the Google Drive. The triggers window allows users to automate events within the script, including setting time intervals for functions to run, and setting error notifications. The navigation menu is useful for debugging and sorting through different projects.
    The lesson covers how to access libraries and services in Google Apps Script, which can be found in the Files area. Libraries allow for the reuse of code across different files, while services provide access to Google APIs for more advanced functionality. HTML files can also be created and used as templates or for client-side code. The lesson walks through creating a library and using the TH-cam API as an example of accessing services. The code examples in the lesson demonstrate how to search for videos on TH-cam. The lesson also covers how to set up a Google Cloud Project and how to add OAuth scopes.
    #AppsScriptIDE #coding #variables #debugging #CommandPalette #keyboardshortcuts #GoogleAppsScript #Deployment #WebApp #ContentService #TextOutput #HTMLOutput #Permissions #TH-cam #Library #Services #HTMLFiles #TH-camAPI #GoogleCloudProject #OAuthScopes #navigationmenu #overviewwindow #triggerwindow #functions #stringmethods #automation #GoogleDrive #timedevents #errornotifications #debugfunction #autocomplete #code #error #suggestions #methods #classes #writingcode #tips #disable #ignore #underlines #dropdownlist #ScriptEditor #Formatting #LoggerLog #GoogleDocs #Scripting #Email #Programming #Gmail #ScriptServices

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

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

    Very thoroughly executed! Thank you.

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

    Thank you for the tutorial. Very useful to have a general idea of what we can do with app scripts

  • @thomsonmathews2683
    @thomsonmathews2683 3 ปีที่แล้ว +8

    Thank you so much! It’s a well laid out & helpful tutorial.

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

    00:00:00 Intro
    00:02:30 Getting Started With Google Apps Script
    00:09:40 What Can You Do With Google Apps Script
    00:17:00 Writing first script
    00:28:30 Google Workspace Services Examples
    00:39:15 IDE Overview Apps Script Editor
    00:41:05 New Project (not really)
    00:51:17 Debugging
    00:59:00 Autocomplete Apps Script Code
    01:08:00 Menu LeftSide Nav Apps Script
    01:24:05 Deploy Library Apps Script
    01:37:40 App Script Web App Deploy
    01:46:10 App Script IDE Features

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

      thank you :)

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

      @@LaurenceSvekisCourses I can see a lot of people watch your Apps Script tutorial, in fact it's the most watched video you have made. As a marketer, I recommend you make a comprehensive Apps Script tutorial for your potential and current audience with a title of "Complete App Script Tutorial for Everyone/Beginners/Advanced", and you can cut informative pieces of your video and make "Check Out My Full Tutorial" clips on all social media platforms. You will see the results. Good luck, you have already done a great job!

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

      Thank you!

    • @thisisachannel-wu2mf
      @thisisachannel-wu2mf 9 หลายเดือนก่อน

      these time stamps helped me alots, thanks mate

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

    Excellent. Lucid and professional. Thank you.

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

    Thank you Laurence for sharing this. Very helpful tutorial. =)

  • @aureliusnt
    @aureliusnt 17 วันที่ผ่านมา

    Amazing class.

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

    This is a very good tutorial! Thx

  • @luc-delaureyatchokeu3000
    @luc-delaureyatchokeu3000 8 หลายเดือนก่อน

    Hello Laurence,
    I am interested in your Google App Script trainings. But you have much app script lessons on udemy that i do not know with which to start.
    Can you please guide me. I should start with which one and continue with which?
    I have very very little knowledge on coding.
    Thanks

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

    Thank You Very Much

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

    I got to this late but this is wonderful and giving me some great ideas for productivity in my small team

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

    Thanks a lot

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

    Perfect

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

    Hi I haven't any experience in Web Development but i have a knowledge of VBA. Can i learn Google App Script. and how much time to learn Google App Script.

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

      Depends on if you have JavaScript experience you can get started quickly with it

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

    Hi,
    I have some doubts :
    Doubt 1 :
    Is there a way to add Google script to a Google Slide that contains the code that gets triggered everytime an event occurs like whenever a key is pressed ?
    Example 1 : Whenever the key Spacebar is pressed from the keyboard.
    Example 2 : whenever the key Next or Presvious is pressed from the keyboard.
    Doubt 2 :
    Can we write google script for a Google Slide that contains code that gets triggered everytime a new Slide get opened, or everytime a specific slide is opened ?
    Doubt 3 :
    Can we disable the keys for next or previous navigation in google slide when it is in present mode by running a Google script ?
    Doubt 4 :
    When we present a google slide then a small menu appears on the left bottom, which gives option to go to a spefoc slide or move to next or go to previous slide etc.
    Is it possible to hide that menu using google script ?

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

      No reason to doubt all the code will work - please try the sample code at github

  • @user-mo3bh6fh1r
    @user-mo3bh6fh1r 8 หลายเดือนก่อน

    How to fix Response Code: 413. Message: response too large
    Please give me resolution

  • @Juggatweet
    @Juggatweet 11 วันที่ผ่านมา

    Do you have a video that will help show me how to run a script on 2 different files. I created one to gather data & update information and it works great in my test file but the real use is across 2 different spreadsheets and i can't seem to figure it out.

    • @Juggatweet
      @Juggatweet 11 วันที่ผ่านมา

      I continued watching & you explained it, guess I'll hold my comments until the end. 😂

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

    Can U please provide the jdbc code to upload files from Google Drive to MySQL Database & then delete it from Google Drive???

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

    Hi Laurence good day! It is posible to print a pdf file on google drive using apps script.

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

      You mean to get a file and send it to print, thats a frontend function to send a document to print, can be done with a webapp

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

    I was wondering why you put const instead of var as variable type.

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

      The newer version of Apps script uses ES6+ code so const and let allow for variable scoping. In general its best practice with JavaScript

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

    Is merging two pdf files into one pdf file included in this video? If no can you provide a resource to do so?

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

      No although you can do this as you convert them to blobs

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

      @@LaurenceSvekisCourses thanks for replying. So you're saying i can get blob of two pdf files then add it to another file? If yes please provide way to add blob of 2 files into one.
      Thanks

  • @randomapperatus3773
    @randomapperatus3773 3 ปีที่แล้ว +3

    Where’s the bit about getting input from a user and passing that into a function, such as the TH-cam search you did??

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

    Hello Coder, I want to learn Google Apps Script with you, what is the requirement?

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

    Is there a way to run a script living in a standalone file from a google sheet?

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

      The only difference is the triggers on the bound scripts, and no access to the UI. You can setup time based triggers or other ways to run code in a standalone script.

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

      @@LaurenceSvekisCourses I'm the owner of a s/sheet with some protected cells. I need to share this s/sheet with different users. I also need the user to run some script, which won't run - unless triggered by myself - because of the protected cells. However, if the script is run as me (owner of the s/sheet) then the script should run even when triggered by the user. I'm therefore exploring the opportunity to run the script as a web app, I'm still early stages though...

  • @Ravikumar-to2tu
    @Ravikumar-to2tu 3 ปีที่แล้ว +1

    Can i get id of any url through DriveApp script.
    I have taken your paid course already

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

      You can select the folder using a search then user getID() to get the id

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

    need the other half of the video!

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

    uh, sir i have a doubt, how did you connect docs and apps script together?

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

    anyone know if you can put a Google app script on a private domain?

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

    Welp. Time to recreate tetris in google sheets.

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

      I believe there is an example of Tetris in Google Sheets ;)

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

    sir i am having an error which says 'TypeError: body.appendParaghaph is not a function'

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

      you don't have the paragraph element selected as the object

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

      @@LaurenceSvekisCourses sir just one more doubt!! what if a person is not familiar with javascript? cause i am just 12 and dont know how to do java script.

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

    How to create libraries??

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

    17:08

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

    Do you think you can send it to me the vid codeing

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

    bro what's this language

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

      Its based on JavaScript V8 engine some syntax with added Google Methods

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

    Looong overdue ide

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

    this is not a course for a beginner, what is a method? what is a class? what is a property?

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

      Its beginners to Apps Script which is based on JavaScript, prior coding experience with JavaScript is suggested

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

    To fast I’m doing, but not learning anything

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

      Do you have prior coding experience, as Apps script is based on JavaScript so prior Javascript is helpful

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

      Do you have prior coding experience, as Apps script is based on JavaScript so prior Javascript is helpful

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

    Please improve your presentation for new learners. You seem to be talking to yourself.
    Regards, Rajinder.

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

      These are full courses, step by step to accomplish the objectives. There is a lot of work and time that I put into them.

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

    The man goes on and on talking about nothing. Get to the point or put times in the video!

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

      The video is a merging of course lessons, the first 2 minutes is an introduction to the upcoming content. I don't know how to put times on the video sorry.

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

    I am trying to get a Change Date Script to work on all TABS inside the Same Main Google Sheet, so that when ever anyone Updates an Amount on my Inventory List it will automatically change the Date to the Current date in the "Date Adjusted" Column. How can I use the Same Script on all TABS in the Same Sheet? This is the CODE:
    function onEdit(e) {
    var range = e.range;
    var spreadSheet = e.source;
    var sheetName = spreadSheet.getActiveSheet().getName();
    var row = range.getRow();
    if(sheetName == 'MASTERPG1')
    {
    var new_date = new Date();
    spreadSheet.getActiveSheet().getRange(row,8).setValue(new_date).setNumberFormat("MM/dd/yy");
    }

    }
    But I have other TABS named "Desks", "Chairs", "Tables" etc How do I make this work on ALL The TABS?

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

      You can add a trigger onChange() then check the active range match against the columns and rows you want to allow changes on.

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

    Thank you for the tutorial. Very useful to have a general idea of what we can do with app scripts

  • @tomaszmiturski5017
    @tomaszmiturski5017 3 ปีที่แล้ว +3

    This is a very good tutorial! Thx