I want to have an add-on for Google Sheet which will give us a URL that we can use to push data into Google Sheet which isn't shared with us. Basically from a Java Project, we wish to push data into the users sheet who installed this add-on, but don't want the users to share the Google Sheet with us due to privacy reasons.
How can we achieve this in Google Apps Script (Published Add-ons) without any human intervention i.e. automatic via marketplace installation? Please guide.
Related
I've made a Google Apps Script project in one sheet that I want to easily access from multiple other Google Sheets, in Google Drive as well as Team Drive.
It would make no sense to publish this script to the Google Web Store since the functionality is based on our own files.
Can I publish it as an addon that's only accessible for users of my domain?
This should be possible by listing it as 'private' in the Developer Dashboard. In the script editor, go to Publish > Deploy as add-on. You have to follow the steps necessary to access the Developer Dashboard and create your listing.
Fill in all the details of your app (name, description, icon etc.) and set its visibility options at the bottom.
I've built a Google Sheets script that queries my company's API and outputs the data from my platform into a spreadsheet. It takes the username and password using a form and then runs an API call to output the results to Google Sheets.
When I tried to publish the addon, I received feedback that I needed to comply with Google OAuth verification. To get this verification, I need to prove that the domain is mine; although I have access to GA for our site (which isn't working for the verification), I am not the domain owner. So, I was wondering, is there a way to publish this Google addon for my company account and what are the next steps to complying with Google OAuth?
Update: Question regarding a proper distribution mechanism in the first place: Publish and distribute a Google Sheets with App Scripts so user gets private copy of sheet
I'm developing an app inside a Google Sheet for which the delivery is basically just hard copy / forking. Does Google Docs have a forking mechanism that counts or tracks forks in any way?
Alternately is there a way to hack this? I could give the user an optional link to register (i.e. Google form) their sheet.
There's no real forking of app script projects, but for the delivery system you describe, google app add-ons do the trick
See the doc here
You can deploy and app for all users of the g Suite domain or through a google group or finally to a specific list of users defined by you
We have a Google Apps domain. The domain has a sheet with a Google Apps Script add-on. We have to share this sheet with people outside our organisation. The add-on is used to refresh the data displayed in the spreadsheet.
When someone who isn't logged in opens the shared link, the add-on is not available for them. Is there a way to get around this?
You will not be able to get around the restriction that requires the user to be logged in.
Your add-on modifies spreadsheet contents on behalf of the user.
That operation requires authorization from the user.
Only logged-in users can grant authorization.
Reference: Develop Add-ons for Google Sheets, Docs, and Forms - Authorization
A separate web service that ran as you, say, and was accessible to "Everyone, including anonymous", could modify a spreadsheet without requiring a user to be logged in. You could not make this part of the Sheets UI, though.
We have a number of Google Apps users, each of them has a non-public spreadsheet named 'XData' in their GDrive account. The Google Apps admin needs to be able to do the following:
Click one button that would collect specified data from users' spreadsheets and put it into a master spreadsheet on admin's account.
Click another button that would display the data from master spreadsheet to admin in a nice visual way.
What's the best way to implement such setup using Google tools (Fusion Tables and/or Admin SDK and/or Apps Script and/or Drive SDK and/or Spreadsheets API and/or etc)? The first step is optional if the second one can be accomplished without it.
1 and #2 can be done easily with apps script only if all the spreadsheets are shared with the script owner.
If they are not shared you can only do it with drive api and user delegation of permissions (see the drive api docs)