0

I'm writing some script for my Documents, Spreadsheets and Gmail. I would like to know if there is a way to save all my script to separate files in a specific google drive folder. I don't like having to go to the backend of my Documents and Spreadsheets in order to edit my script.

Would I have to call the document from my script using "getByID" or is there another way?

1 Answer 1

1

Yes, when you create a new document in Drive you can select Script. If you don't see the script option, try going here.

You will, however, need to call your document using getByID. There my be other complexities if you are using onEdit type triggers.

A lot more information can be found under the Types of Scripts heading at Google Apps Scripts Documentation.

You could go advanced and pull your script in behind the Document as a Library and then using the script behind the Doc to make the calls to the library, but that's a bigger discussion.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your help. I'm curious about that bigger discussion. Would you be able to give me a link so as to look into that thing about: "pull your script in behind the Document as a Library"?
You can find out more about using Libraries in the documentation. In short, you load the other project as a resource. You name the library, eg MyLib then any function not ended with _ will be available to you. ie MyPublicFunction will be available but MyPri ateFunction_ will not. Libraries are a very useful way to create wrappers for RESTApi services, common ScriptDB instances etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.