Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Gemini can't access sheets that are shared

I am struggling to find a straight forward answer to this. Hoping someone can help. I have created a Gem to answer questions based on the data in two sheets that are shared with the Gem. 

This works fine a couple of times and then the Gem seems to lose access to the sheets. Clicking edit shows they are still shared.

I need it to reliably access these files to be useful. Everything appears to be enabled correctly because it does work for a limited period.

Can anyone suggest what might be going wrong and how to fix it?

Thanks in advance

1 2 476
2 REPLIES 2

Helo IDA2

Most common causes:

Authorization Token Expires or is Revoked

Gem's access to your files depends on temporary permission tokens.

By default, these tokens expire after a period of time (sometimes a few hours or days) for security reasons.

Even if the file is shared, the Gem-specific token can become invalid.

When you click "Edit," everything seems fine, but in practice, Gemini has lost the access key.

Change in Workspace Permission Scope

If you use a Workspace (corporate) account, administrators can run periodic rules that automatically revoke integrations, even without warning.

Gemini may work for a while and then stop working due to corporate policy (DLP, auditing, token review, etc.).

Gem Cache or Session Timeout

Custom Gems don't store files permanently. They "remember" access while the session is active.

If you don't use the Gem for a while, or if you log out or log in, access may disappear because the Gem loses the link to the cache for that file.

How to fix and prevent this:

1. Reauthorize Whenever You Lose Access

> Go to:
Gems > Edit > Sharing > Reauthorize Access.
Remove and re-add spreadsheets.

2. Prefer Public Spreadsheets or Shared Links

If the content is safe to share, use the option:

> "Share with anyone with the link (view)"
This reduces the chance of the access token expiring.
3. Check Workspace Account Settings

If your account is a Google Workspace account, ask your administrator to ensure that:

Gemini / Duet AI has continuous permission to access Google Drive.

OAuth tokens are not automatically revoked after short periods.

There are no DLP rules blocking them.

4. Recreate the Gem in a More Stable Way

Some people report that creating a new Gem, rather than constantly re-editing the same one, sometimes stabilizes behavior. This appears to be related to Gemini's internal cache.

Important:
Even when everything is working correctly, Gemini doesn't guarantee permanent access to external files. It's designed for short-term interactions, not to store persistent links to files like an API.

Straightforward Summary:
> The problem lies in the temporary token, which expires or is revoked.
Quick fix: Remove and reconnect the files whenever you notice loss of access.
Long-term fix: Check Workspace permissions and, if possible, use open-read links.

 

Hug

Francisco 

Thanks for your detailed responce it is really appreciated. 

I removed and readded the files but still got a very unreliable output. Sometimes answering the queries and other times not. If it is a token issue then the length of time before the token is no longer accessible is varying.

Our ICT manager checked permissions and everything was fine.

Ultimately I need a team of people who are not all IT savy to be able to use the system we invisage. I have decided to look at ChatGPT and drive based gemini pro as alternatives to using the gem.

Thank you for you help.

Top Labels in this Space
Top Solution Authors