I'm trying to capture data (mainly the integer, double, string and time values) that is sent from a website periodically with firestore as its source. Examples of the data source and structure are shown below.

I found a script that captures that data and stores them in local memory. But as that requires a tab with that script to be left open to continue recording, I would like to have them sent to google sheets directly, is this possible?

Sample data acquired from chrome>developer tools>network https://pastebin.com/nNqycAjn

Sample data url https://firestore.googleapis.com/google.firestore.v1beta1.Firestore/Listen/channel?database=projects%2Fhunt-the-mouse-2018%2Fdatabases%2F(default)&VER=8&RID=19056&CVER=22&X-HTTP-Session-Id=gsessionid&%24httpHeaders=X-Goog-Api-Client%3Agl-js%2F%20fire%2F5.5.0%0D%0A&zx=hommxl4u3v4d&t=1

Script that periodically appends to a hosted webpage and data stored in local memory. https://pastebin.com/u0Y6eGkk

Basically, I think I just need to translate the script into GAS and run it off the timer?

PS: I found these but as I'm not the owner of the Firebase data, the instructions don't help much. http://grahamearley.website/blog/2017/10/18/firestore-in-google-apps-script.html https://sites.google.com/site/scriptsexamples/new-connectors-to-google-services/firebase/tutorials/read-and-write-data-in-firebase-from-apps-script

  • If anyone needs more details about the question please let me know. It seems this question is receiving very little love here. – Allen Sierra Jan 28 at 11:17

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.