> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/cloud/files/integrations/providers/google-drive.md).

# Google Drive

Connect a Google Drive folder as a Files integration.

> Store your project's files in Google Drive, using a service account.

*Last updated 2026-09-11 · Applies to all projects*

**Where:** Files → Integrations → **Add New Integration** → Google Drive · `/projects/<project>/files/integrations/new/google-drive`

## Why it exists

Sometimes files need to be where people already work, not in a bucket only developers can reach. Writing to Google Drive means your team can open, share, and comment on what the application produced — reports, exports, generated documents — without anyone downloading them from a console first.

## When you'd use it

* Generated reports should land in a Drive folder the team already shares.
* Non-technical staff need to open the files your app produces.
* A small project has no cloud storage account but does have Google Workspace.

## Where to find it

Files → **Integrations** → **Add New Integration** → **Google Drive**.

<figure><img src="https://760328771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwSkuCpTNI_AerL8J2a%2Fuploads%2Fgit-blob-aa8f850e245473e7516f49707c778ce3d0df2199%2Ffiles-new-google-drive.png?alt=media" alt="The New Google Drive Integration form"><figcaption><p>Files → Integrations → Add New Integration → Google Drive.</p></figcaption></figure>

## Walkthrough video

{% hint style="warning" %}
Video **required, not recorded yet.** The documentation standard asks for one whenever setup leaves the Norbix screen, and this one spans two: a service account and JSON key in the Google Cloud console, then sharing a Drive folder with that account's address. A screen recording of real Google accounts is needed; the Playwright suite cannot produce it.
{% endhint %}

## How to set it up

You need the `files:create` permission on `files:integration:all` in Norbix, and rights in Google Cloud to create a service account.

1. In the Google Cloud console, create a **service account** and enable the **Google Drive API** for its project.
2. Create a **JSON key** for that service account and download it.
3. Decide where files go. To use a specific folder, open it in Google Drive and **share it with the service account's email address** (it looks like `name@project-id.iam.gserviceaccount.com`) with edit rights. Copy the folder id from the URL — in `https://drive.google.com/drive/folders/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms` the id is the part after `/folders/`.
4. In Norbix, go to **Files → Integrations → Add New Integration → Google Drive**.
5. **Service Account JSON Key** — paste the whole contents of the file from step 2, starting with `{` and ending with `}`.
6. **Root Folder ID (optional)** — paste the id from step 3, for example `1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms`. Leave it empty to use the service account's own Drive root.
7. Give the integration a **name** you will recognise, such as `Team reports`.
8. Press **Test**, then **Save**.

**What "working" looks like:** **Test** reports success and the [Browser](/cloud/files/browser.md) lists the folder's contents (empty is fine).

## Good to know

* **Sharing the folder is the step people miss.** Without it the service account cannot see the folder, and the test fails even though the key is valid.
* **A service account has its own small Drive quota.** If you leave **Root Folder ID** empty, files go to that account's own space, not to your Workspace storage. For anything beyond a trial, share a real folder and set the id.
* **The JSON key is the secret.** Re-opening the form shows the root folder id filled in and the key field empty. Leave it empty to keep the stored key.
* **Drive is not object storage.** It is slower than S3 or Google Cloud Storage and applies its own per-file and per-day limits. Do not use it for high-volume user uploads.
* Deleting the integration does not delete anything in Drive.

## Do it in code

{% tabs %}
{% tab title="JavaScript / TypeScript" %}

```ts
import { Norbix } from '@norbix.ai/ts';
const norbix = new Norbix();

await norbix.hub.files.saveFilesIntegration({
  name: 'Team reports',
  provider: 'GoogleDrive',
  integration: {
    serviceAccountJsonKey: '<paste the JSON key here>',
    rootFolderId: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms',
  },
});
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using Norbix.Sdk;

using var client = new NorbixClient();

await client.Files.SaveFilesIntegrationAsync(new SaveFilesIntegrationRequest
{
    Name = "Team reports",
    Provider = "GoogleDrive",
    // provider-specific body: serviceAccountJsonKey, rootFolderId
});
```

{% endtab %}

{% tab title="Python" %}

```python
from norbix_python import NorbixHub

norbix = NorbixHub()

norbix.files.save_files_integration(
    name="Team reports",
    provider="GoogleDrive",
    integration={
        "serviceAccountJsonKey": "<paste the JSON key here>",
        "rootFolderId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
    },
)
```

{% endtab %}

{% tab title="Go" %}

```go
c, _ := norbix.New(norbix.Options{})
ctx := context.Background()

var result map[string]any
_ = c.Hub.Files.SaveFilesIntegration(ctx, map[string]any{
	"name":     "Team reports",
	"provider": "GoogleDrive",
	"integration": map[string]any{
		"rootFolderId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
	},
}, &result)
```

{% endtab %}
{% endtabs %}

**CLI:** the Norbix CLI covers files themselves (`norbix files list`, `info`, `download`, `upload`, `sign`, `delete`) but has no command for the module or its integrations. Use an SDK or the API for those.

Method page: [Save Files Integration](/sdks-and-cli/files/integrations/save-files-integration.md)

## API reference

Endpoints: [Save Files Integration](/api-reference/files/integrations/save-files-integration.md) · [Files → Integrations](/api-reference/files/integrations.md).

## Related

[Providers](/cloud/files/integrations/providers.md) · [Google Cloud Storage](/cloud/files/integrations/providers/google-cloud.md) · [AWS S3](/cloud/files/integrations/providers/aws-s3.md) · [Integrations](/cloud/files/integrations.md)
