I have Google Sheet open for everyone
https://docs.google.com/spreadsheets/d/1H3slbaG_p6u3NihRDJfPECGF_teVoi-DGyJkDM5japg/edit#gid=0
And I have Google Apps Script that generates XML based on this Sheet.
https://script.google.com/macros/s/AKfycbza3jI02E9zQDB-VoVBrxpHTUq8QUY2lVrUd1bGuf5q5L7jOybq/exec
So can I allow everyone get result of this script without authentification?
Yes, you can allow everyone use your script by doing following changes :
Making Spreadsheet Open for everyone (Give Edit rights to Anyone with Link)
Attach script to that Spreadsheet (Open that Spreadsheet>Tools>Script Editor) and execute the script at least once to authorize it on your behalf.
If this doesn't work or you need anymore assistance then kindly let me know in comments.
Related
I am working on Google Apps Script. I want to share the Google Apps Script Editor to another account.I use Chrome browser.
I clicked File > Sharing in the editor. But I got this error:
I tried to remove all the cache and cookies and histories from the browser. but, same.
If you want to share a script bound to spreadsheet you need to share the spreadsheet itself
It is no possible to share a bound script is the spreadsheet is not shared
If the spreadsheet is shared, there is no need to explicitly share the script
I've built a spreadsheet as a form by google script with one button which updates a database(a different sheet) according to the form - btn_pressed().
I want to authorize any google account I give access to - to use the form (activate the google script code), and update the database and send mail (part of the btn_pressed() process).
should I publish the script as a web app? or there's another way to do what I'm looking for
I understand that you want to automatically authorise the script for other users when they come to run the script?
I recently learnt you can only do this with certain triggers such as onOpen() out onEdit(), there is a way round this though. Please see the following link as i asked the question on here myself!
Remove authorisation required for script on Google sheets
I trust that helps
We have google spreadsheets with scripts embedded on it to generate data automatically from a remote server. I just want to know if it is possible to know if the modification on a certain sheet was done via google script or was edited manually in the edit history?
You could create a new user in your Google Apps domain that the script is 'run as'. That way you'll know whether it was the script or a user that made the edits
I have a seemingly simple problem that seems to get more complicated the more I get into it.
I have one spreadsheet document.
This spreadsheet utilizes a google apps script, that in turn utilizes various APIs: Domains, Sites, Spreadsheets...
To use this spreadsheet I have to take a few steps -
Authorize the spreadsheets. This dialog only comes up if I use the
script editor, otherwise the Spreadsheet fails silently.
Enable Domain API in Editor -> Resources -> Advanced Google Services
Enable Domain API in Google Developer Console to a seemingly hidden
project that is attached to my spreadsheet. The only way I can access this secret page is through the Advanced Google Services menu in step #2.
After getting through these hurdles, the spreadsheet now functions correctly without having to use the Script Editor.
Now I want to share this spreadsheet with other users in my company's domain.
Is there any easy way to do this, or will every single user I share it to have to jump through these hurdles as well?
Am I thinking about this wrong? The documentation states the script is 'attached' to the spreadsheet. But the more I get into it, the more separate these two things seem to be. I can share a spreadsheet - but the script won't function properly. I can publish a 'web app' with the script editor - but it won't come with the spreadsheet.
Any help appreciated
Frusteratingly yours...
Other users will have to have the same domain permissions as you do.
An approach you could take is have all the permissions related work done on a script that is published as a web app that will take url parameters (to trigger tasks), which is run as you and accessible to others.
From there, your original script can call the published url and send instructions via parameters.
https://developers.google.com/apps-script/guides/content
Is there a way to have a spreadsheet in Google Drive where the script is protected from modification / editing? Does anyone know if that is an option in the Script editor?
Another thing I'd like to ask. How does one do source control for the codes in their Google scripts?
Thanks.
WRT privacy / protection of scripts: Refer to the comments and answers on this question: How to protect the Apps Script code in a Google spreadsheet?.
Source Control? See Backing up Gapps source. The version tracking in the script editor is rudimentary, so you should consider doing source control outside - you'll have to get used to copy & paste.
No you can't do it.
The script runs with the document permissions.
If you have Edit permissions on the document, you have edit permission on the script too.
Here's the Google spreadsheet developer guide.
https://developers.google.com/apps-script/reference/spreadsheet/