Gemini API and other GCP services integration

Hello There,

Does somebody know if by using Gemini API in my organisation which has its whole infrastructure in GCP, is gemini able to access information from services such as BigQuery, Google Sheets and Google CloudStorage?

What I mean is when I will build chat interface with Gemini and when user from my organisation will ask a chat for example : Where I can find statistics regarding XYZ from YYY google sheets document will Gemini will be able to search organisation google sheets by default or I will need to write separate functions for doing that?

1 Like

Welcome to the forums!

Yoru question, and the answer, are more complicated than you probably thought. So it requires a bit to break it down.

For starters, if you’re mostly doing your other work with GCP, then you should be using the Gemini API through Vertex AI, not through AI Studio. You have a number of advantages to doing it this way that will make your life a lot easier (you won’t need to deal with API Keys, for example, but can take advantage of GCP Application Default Credentials).

There are a bunch of different ways BigQuery works with Gemini. Enough that I’m sure trying to list them I’d miss at least half.

One that I find pretty cool, however, is that you can use Vertex AI Gemini API to ground your responses with a data store from Vertex AI Search. And, sure enough, BigQuery can be used to cereate a Data Store.

This now gets more complicated.

The Gemini API doesn’t have direct integration with Google Sheets. You can write it, of course, since Sheets has a great API and AppsScript works great with Gemini. (I’ve personally done a lot of work on Gemini-Sheets integration.) Lots of videos out there on this subject.

But off-the-shelf integration comes with the Gemini for Workspace and Gemini for Enterprise products. But these aren’t developer level tools.

You can use GCS objects as Data Store sources (see above). You can also use GCS objects as the media sources for Gemini API multimodal prompts.

You’d need to do the integration for sheets… but you may not need to write that chat since Gemini for Workspace may be able to do that for your user already.

Good luck!

1 Like