0

I have some code that runs as a Google Apps Script (GAS), iterating over a Google Doc's contents and extracting elements, using methods such as getBody, getText, getChild, and so on. I'd like to port the code to run on Node.js. However when using the API, you get documents as a tree of static dictionary objects, rather than instances with these accessor methods.

I want an adaptor / facade that exposes the static object tree as a tree of class instances that offer the GAS methods aforementioned. (My parsing code is 2,500 lines and will get improvements.) Naturally, I'd quite like this for free, as it'd be a lot of work.

The GAS service must be doing this internally, extracting and returning details from the document object tree.

Is there anything available that does this, ie, allows me to use the document traversal GAS methods aforementioned outside of Google's GAS infrastructure?

(I don't want to use the GAS infrastructure as it is error prone, slow, time and rate limited, non-atomic, varies by user account type, and so on. However out of the box ideas very welcome indeed - I'm new to Google Apps.)

Chris
  • 5,664
  • 6
  • 44
  • 55
  • I apologize for my poor English skill. Can I ask you about your goal? You want to use the methods of Google Apps Script without using Google Apps Script. Is my understanding correct? – Tanaike Oct 15 '21 at 01:41
  • Thanks, your English is excellent! I have a working GAS script that I want to run on Node. My dream solution would be the GAS library available as a Node package that operates on the object tree you get from the v1 Docs API. (I have the OAuth2 part working fine.) – Chris Oct 15 '21 at 07:30

0 Answers0