AppScript. Will linked GCP project affect quota? - google-apps-script

I'm confused with one moment regarding GCP. So, i have different AppScript projects on different google accounts and i want to link them to single GCP project (on organization level) to be able to see logs in single place (followed this description). Everything work fine, but i don't understand now if it will affect quota somehow. From my understanding quota described here is per user, but i just worry that i missed something and because of the linked GCP project quota will be splitted between all appscript project.
I would appreciate any help and advice related to this question)

I don't think there's any limit to read/write operations for sheets using apps script, there's nothing about it in quotas and it doesn't make much sense.
There are quotas if you use Sheets Api via http
https://developers.google.com/sheets/api/limits
but that's entirely other story, and you only need this to access sheets from other environments(nodejs,php,python etc)
If you're using apps script I believe you're only limited by script runtime and total trigger runtime, which are counted per-script.

Related

is there any database for Google apps script/workspace add-on

I am working on a google workspace add-on for gmail. As part of it, I want to store and index some data, so that it can be later aggregated/enriched for insights.
I don't want to use some external(outside-google-workspace) database as it will have data privacy and security implications. So, I want to keep that data within the safe precincts of the user workspace.
Is there any database service within the google workspace for the above mentioned requirements?
PS: I am already aware of Properties service which can store configurations. The data i want to persist is definitely more than that.
There is no such database.
The closest alternatives, as already mentioned, are PropertiesService, which has obvious limitations, and Google Cloud SQL databases, which live in Google's cloud but is not part of Google Workspace.

How to check your account's Google Apps Script quotas

Here is the link about the GAS quotas:
https://developers.google.com/apps-script/guides/services/quotas#current_quotas
How can I check if I am getting close to certain quotas. For instance, how can I check, how many UrlFetchApp calls I have left for that day. Or how much Script time do I still left for that day.
I need to use this data to make decisions whether to run today or run tomorrow.
I need to check and verify quotas programatically only. Can anyone help me here?
its not currently possible.
you need to tally those stats manually, maybe storing on script properties.

MySQL database efficiency for spreadsheet web app

Background: I am hoping to make a spreadsheet program a bit like Google Docs. I am currently in the planning phase and have realised that if one cell is changed then that could potentially affect 1,000+ other cells in the spreadsheet. I realise making 1,000+ database calls would be very slow and is thus inappropriate.
My question: how does one keep formula and value like information in a database and quickly make changes. The best approach I can think of is to download all 1,000+ cells as one big JSON object and then do the same for upload? I just can't imagine this is what Google does as the download and save speeds are so fast.
Promising pages have included:
http://www.trirand.com/blog/jqgrid/jqgrid.html
and
http://www.simple-groupware.de/cms/Spreadsheet/Home
but I have yet to be able to find a simple answer to my question.
In addition to these so far I have looked at:
Using formula-based data in Google Spreadsheet as back-end for Web App,
https://stackoverflow.com/questions/20961510/creating-a-basic-web-app-for-writing-reading-databases-google-spreadsheets
Spreadsheet like input facility for ASP MVC
http://www.reddit.com/r/SideProject/comments/1s466o/cellmaster_spreadsheet_formulas_that_build_web/
Open Source, web based spreadsheet app with formulas
Store spreadsheet kind of data in SQL Database
Database : best way to model a spreadsheet.
FYI: I am coding in the HTML5/LAMP stack but I am happy for solutions to come in any form as I can always "port" the ideas from anywhere. So far the most help I got was from:
http://en.wikipedia.org/wiki/Entity-Attribute-Value_model.
I am not so idealistic as to expect anyone to give me a concrete code implementation but I do believe this problem is not unique and that someone on stackoverflow is clever enough to have worked out an efficient method for storing and retrieving spreadsheet like information within a web app environment. Please just point me in the right direct and I will do the research to create my own solution.
Perhaps you can make use of Google Apps Script, in combination with ScriptDb.
References
Home page Google Apps Script Developers
Guide on ScriptDb
Edit 16-05-2014
Don't use the ScriptDB anymore !! It will be shut down as of Nov 20, 2014,
see sunset schedule: Apps Script Sunset Schedule

Archiving data in spreadsheets

I have implemented a time booking system based on spreadsheets which the users fill out and then are consolidated into one central (and big) spreadsheet.
After having had a few performance issues the whole application now runs perfectly since several months. However, I will soon run into the size limitation of spreadsheets (400k cells).
In the consolidated spreadsheet I basically do not need more data than the current month. However for statistical purposes I would appreciate if I could make the data easily accessible for the domains users.
Basically the BigQuery Service would be perfect but I did not find an API to write data to it from a spreadsheet. I hesitate to use the Google provided MySQL database for cost reasons.
Are there any other ideas around?
There's a built-in Google BigQuery API for Apps Scripts, you just have to enable it manually under Resources > Use Google APIs. There's also Fusion Tables, that does not have a built-in API but is somewhat simple to use via UrlFetch.
Anyway, if it's statistical purposes, why don't you just "compile" the data in another spreadsheet? e.g. month - amount of entries - total prices - avg etc - etc...

Google Script for scheduling pages on a Google Site

I am exploring the option of using Google Sites for our new intranet. We need to be able to schedule pages when they are created to automatically be deleted on a particular day.
I know this functionality is not native, and I would like to know whether or not it's possible to write a Google Script for a scheduling gadget in the editor view (as opposed to the live site).
And advice is very welcome. Thanks!
Jessica
If I was implementing this, I'd write a standalone script with two separate trigger functions, both of which run daily.
Script 1 would inventory the pages in the site. When new pages are
identified, their creation and projected deletion dates would be
recorded.
Script 2 would review the list of known pages, and delete any that
have reached their expiry date.
The reason for splitting the work up is two-fold: it simplifies the problem a bit to think about it this way, and it reduces the chance of experiencing a script time-out failure.
Unless there is a native way of doing this, I would create a WatiN interface to Google sites to create and delete pages