# google_drive_download

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [connect-full.txt](https://docs.redpanda.com/connect-full.txt)

---
title: google_drive_download
latest-connect-version: 4.117.0
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-redpanda-tag: v26.2.7
docname: processors/google_drive_download
page-component-name: connect
page-version: master
page-component-version: master
page-component-title: Connect
page-relative-src-path: processors/google_drive_download.adoc
page-edit-url: https://github.com/redpanda-data/rp-connect-docs/edit/main/modules/components/pages/processors/google_drive_download.adoc
description: Downloads files from Google Drive.
page-git-created-date: "2025-05-19"
page-git-modified-date: "2026-10-29"
page-generated-sources:
  - include: connect:components:partial$descriptions/processors/google_drive_download.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$availability/processors/google_drive_download.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$fields/processors/google_drive_download.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
  - include: connect:components:partial$examples/processors/google_drive_download.adoc
    generator: null
    version: null
    source: the component specs in https://github.com/redpanda-data/connect
page-generated-content: partial
---

<!-- Source: https://docs.redpanda.com/connect/components/processors/google_drive_download.md -->

**License**: This component requires an [enterprise license](https://docs.redpanda.com/redpanda-connect/get-started/licensing/). You can either [upgrade to an Enterprise Edition license](https://www.redpanda.com/upgrade), or [generate a trial license key](http://redpanda.com/try-enterprise) that's valid for 30 days.

Downloads files from Google Drive.

Introduced in version 4.53.0.

Can download a file from Google Drive based on a file ID.

## [](#authentication)Authentication

By default, this connector will use [Google Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials) to authenticate with Google APIs.

To use this mechanism locally, run these gcloud commands:

```bash
# Log in for the application default credentials and add scopes for read-only Drive access
gcloud auth application-default login --scopes='openid,https://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/drive.readonly'
# When logging in with a user account, you may need to set the quota project for the application default credentials
gcloud auth application-default set-quota-project <project-id>
```

Replace `<project-id>` with your Google Cloud project ID.

Otherwise if using a service account, you can create a JSON key for the service account and set it in the `credentials_json` field. In order for a service account to access files in Google Drive either files need to be explicitly shared with the service account email, otherwise [domain wide delegation](https://support.google.com/a/answer/162106) can be used to share all files within a Google Workspace.

Try out the [example pipeline on this page](#examples), which downloads all files from your Google Drive.

### Common

```yml
processor:
  label: ""
  google_drive_download:
    credentials_json: "" # No default (optional)
    file_id: "" # No default (required)
    mime_type: "" # No default (required)
    shared_drives: false
```

### Advanced

```yml
processor:
  label: ""
  google_drive_download:
    credentials_json: "" # No default (optional)
    file_id: "" # No default (required)
    mime_type: "" # No default (required)
    export_mime_types:
      application/vnd.google-apps.document: "text/markdown"
      application/vnd.google-apps.drawing: "image/png"
      application/vnd.google-apps.presentation: "application/pdf"
      application/vnd.google-apps.script: "application/vnd.google-apps.script+json"
      application/vnd.google-apps.spreadsheet: "text/csv"
    shared_drives: false
```

## [](#fields)Fields

### [](#credentials_json)`credentials_json`

The JSON key for your service account (optional). If left empty, Application Default Credentials are used.

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Secrets](https://docs.redpanda.com/connect/configuration/secrets/).

**Type**: `string`

### [](#export_mime_types)`export_mime_types`

Maps Google Drive MIME types to [supported file export formats](https://developers.google.com/workspace/drive/api/guides/ref-export-formats). The MIME type is the key, and the export format is the value.

**Type**: `object<string>`

**Default**:

```yaml
application/vnd.google-apps.document: "text/markdown"
application/vnd.google-apps.drawing: "image/png"
application/vnd.google-apps.presentation: "application/pdf"
application/vnd.google-apps.script: "application/vnd.google-apps.script+json"
application/vnd.google-apps.spreadsheet: "text/csv"
```

```yaml
# Examples:
export_mime_types:
  application/vnd.google-apps.document: application/pdf
  application/vnd.google-apps.drawing: application/pdf
  application/vnd.google-apps.presentation: application/pdf
  application/vnd.google-apps.spreadsheet: application/pdf

# ---

export_mime_types:
  application/vnd.google-apps.document: application/vnd.openxmlformats-officedocument.wordprocessingml.document
  application/vnd.google-apps.drawing: image/svg+xml
  application/vnd.google-apps.presentation: application/vnd.openxmlformats-officedocument.presentationml.presentation
  application/vnd.google-apps.spreadsheet: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
```

### [](#file_id)`file_id`

The ID of the file to download from Google Drive.

This field supports [interpolation functions](https://docs.redpanda.com/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

### [](#mime_type)`mime_type`

The [MIME type](https://developers.google.com/workspace/drive/api/guides/mime-types) of the file for download.

This field supports [interpolation functions](https://docs.redpanda.com/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

### [](#shared_drives)`shared_drives`

Whether or not to include shared drives.

Requires version 4.80.1 or later.

**Type**: `bool`

**Default**: `false`

## [](#examples)Examples

### [](#download-files-from-google-drive)Download files from Google Drive

This examples downloads all the files from Google Drive

```yaml
pipeline:
  processors:
    - google_drive_search:
        query: "name = 'Test Doc'"
    - google_drive_download:
        file_id: "${!this.id}"
        mime_type: "${!this.mimeType}"
```