Google workspace services full example

75 Views Asked by At

I can't find a fully, runnable example. It's always just the code itself. I'm not even sure where I can run it. There's examples how to run it in Sheets and such, but not for Google Drive. I suppose I have to use one of the languages and run it locally? What's a full example that's executable to run Google workspace services code like DriveApp.

E. G. Let's take this following code https://stackoverflow.com/a/77115873/7215091 These are just a bunch of functions. You can't put them in a file and run them obviously. How do I run this code?

1

There are 1 best solutions below

1
steros On

Okay it seems I really have to use Google Sheets or Google Forms to do this. What I figured:

  1. make a new empty sheet (or form)
  2. go to Tools -> Script Editor
  3. paste the code there like a function onOpen() will run when the sheet is opened or onSubmit when a form is submitted 3.1. you can add a menu entry button in the onOpen() function in sheets
  4. run the code by clicking the button in the sheets menu

source: https://hawksey.info/blog/2015/02/tutorial-interacting-with-your-google-drive-with-apps-script-including-parsingwriting-csv-files/