You are here

How to Build a Node.js CLI that calls Apps Script Execution API

Given the rising power and varied use cases of APIs, combined with the popularity of JavaScript for building Web applications, Node.js has grown into a useful tool for many developers.

Node.js performs as a runtime environment for (mostly) server-side applications. But the fact that it is written in JavaScript makes it familiar to Web developers. Now, using this Google Quickstart you could easily build a simple Node.js command-line application that makes calls to the Google Apps Script Execution API.

The Execution API enables third-party applications to call an Apps Script project and receive a response, allowing easy integration with Google services for a range of uses. This CLI should only take about 5 minutes to create, and requires Node.js installed, as well as the npm package management tool (which comes with Node.js).

It is important to begin by setting up a target Apps Script to call with the API, and then install the client library and set up the sample using the code provided. Run the sample, provide access and your simple Node.js CLI should be calling your target Apps Script.

Original Article

Node.js Quickstart

Martin W Brennan Martin W Brennan is a co-founder of ViewPop, the social network that puts the creation of 3D photos and videos in the hands of anyone with a smartphone. For his day job, Martin is a copywriting consultant at We Write Words, learning about the world as he writes about it.
 

Comments