> ## Documentation Index
> Fetch the complete documentation index at: https://learn.getodin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Cloud Platform Connection

> Connect a GCP service account for BigQuery, Cloud Run, and Cloud SQL access.

The **Google Cloud Platform** connection allows your agents to authenticate with GCP services using a service-account JSON key. Once connected, agents can access BigQuery, Cloud Run, and Cloud SQL based on the IAM roles granted to the service account.

## Adding a GCP Connection

1. Go to **Settings → Connections** in the left navigation menu.
2. Under **Cloud Platforms**, click the **Google Cloud Platform** card.
3. Click **+ Add GCP Connection**.
4. Fill in the form and click **Add Connection**.

## Connection Form

| Field                    | Required | Description                                                                                                |
| ------------------------ | -------- | ---------------------------------------------------------------------------------------------------------- |
| **Connection Label**     | Yes      | A display name for this connection (e.g. `Production GCP`).                                                |
| **Service-account JSON** | Yes      | Paste the contents of your service-account JSON key, or click **Upload .json file** to upload it directly. |
| **GCP Project ID**       | No       | The GCP project ID. Defaults to the `project_id` in the service-account JSON if left blank.                |
| **Default Region**       | No       | The default region for Cloud Run and Cloud SQL operations (e.g. `us-central1`).                            |
| **BigQuery Location**    | No       | The BigQuery dataset/job location (e.g. `US`, `EU`).                                                       |

<Note>
  Credentials are tested against Google IAM before saving, and the key is stored encrypted in the integrations table. Only the `client_email` and project are surfaced to agents.
</Note>

## How to Get a Service-Account JSON Key

1. Open the [Google Cloud Console → Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts).
2. Pick or create a service account and grant it the roles it needs (e.g. `BigQuery Data Viewer`, `Cloud Run Invoker`, `Cloud SQL Client`).
3. Open the **Keys** tab → **Add key** → **Create new key** → select **JSON**.
4. Paste the downloaded JSON into the **Service-account JSON** field, or upload the file directly.

## Managing Connections

To view, edit, or remove existing GCP connections, go to **Settings → Connections** and click the **Google Cloud Platform** card. From there you can add additional connections or delete ones that are no longer needed.

<Info>
  To use a GCP connection with an agent, go to the agent's **Toolkits**, add the **Google Cloud Platform** toolkit, and select the connection from the **Select GCP Connection** dropdown. For more details, see [Google Cloud Platform Toolkit](/gcp-toolkit).
</Info>
