Mark.B
Mark.B

Reputation: 31

Running google app script from another app script

Is there a way to run a google app script from a different app script?

I'm just getting into google app scripts and I couldn't find anything on the internet.

Upvotes: 1

Views: 4721

Answers (3)

Altaf Khokhar
Altaf Khokhar

Reputation: 306

You can call google app script form javascript or web page. You have to implement doGet(or post) and publish your google app script.

I found good example.

Cheers.

Upvotes: 0

Anees Hameed
Anees Hameed

Reputation: 6544

It seems like you are looking for libraries functionality in Google App Script. Documentation

You can save a version of the script that you have the functions in it, and import the functions on to a second script file through menu>resources>libraries. You need to use script id for importing libraries, which you can find from menu>File>Project properties>Script ID

You can then execute the function using the script file name as the reference.

Upvotes: 2

Mario R.
Mario R.

Reputation: 679

You can use the Apps Script API, you may find this helpful Executing Functions using the Apps Script API

"The Apps Script API provides a scripts.run method that remotely executes a specified Apps Script function"

Upvotes: 1

Related Questions