3

Is it possible to create a brand new google app script programmatically and attach him to a specific google doc?

Or in any other way, to make 1 bound script and make several google docs to share him as the same bound script?

1
  • 4
    A good Stack Overflow question includes an explanation of what you have already tried. It is possible to programmatically create a new Apps Script file with content. Even though the original script is bound, I believe that it can still be used as a library in other Apps Script files. And an add-on can do that also, but it's better to have a stand alone Apps Script file as the basis for an add-on or library. I believe that the new Apps Script API can deploy scripts and new versions. But you are asking a very broad question. Commented Jul 4, 2018 at 15:13

1 Answer 1

4

Yes. Possible through the API.

Use project.create. You can provide a project title. You can also create a bound script by providing the Google Drive ID of a Google Doc, Sheet, Form, or Slides file to act as the script's parent.

clasp is an open-source tool, separate from the Apps Script platform, that lets you develop and manage Apps Script projects from your terminal rather than the Apps Script editor.

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

Comments

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.