Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to 'integrate' my GCP project Google Drive with my company's GSuite? #5

Closed
vitalyk-multinarity opened this issue Mar 27, 2023 · 3 comments

Comments

@vitalyk-multinarity
Copy link

Sorry for off-topic, but:

  • Thanks for your CLI utility, I'm able to manage Google Sheets, using my GCP service account
  • But I don't understand how I can access these sheets from my company's Gmail account (I mean - I and my co-workers should have access from our browsers).

Thanks,
Vitaly

@cristoper
Copy link
Owner

cristoper commented Mar 28, 2023

Hi Vitaly,

It depends on how you are creating the files you manage with gsheet. Are you creating new files with gsheet upload that you then need to access via the browser?

If so, the workflow I recommend is to first manually create a folder in Google Drive and share that with both your service account (something like [email protected]) and any coworkers that need access. Take note of the folder id in the browser. And then have gsheet create new files in that folder:

gsheet upload --parent ...yourFolderID... FILE_NAME

Those files will then be accessible in Google Drive to everybody.

If you just use gsheet upload without specifying --parent then the file gets uploaded to the service worker's root directory which is not accessible via the browser. You can get the root folder ID with gsheet info file_id, but gsheet does not currently provide a way to share that folder with human users (although I'm open to implementing that).

Does that clarify things?

@vitalyk-multinarity
Copy link
Author

Thank you @cristoper.

the workflow I recommend is to first manually create a folder in Google Drive and share that with both your service account (something like [email protected]) and any coworkers that need access.

This makes sense, I'll try it.

Vitaly

@cristoper
Copy link
Owner

Let me know if you run into any issues. It can be annoying to have to pass the --parent id all the time, but you can instead set it once in the GSHEET_PARENT environment variable.

cristoper added a commit that referenced this issue Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants