# google_drive_download

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

---
title: google_drive_download
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: connect/components/processors/google_drive_download
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: connect/components/processors/google_drive_download.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/develop/pages/connect/components/processors/google_drive_download.adoc
page-git-created-date: "2025-05-19"
page-git-modified-date: "2026-05-26"
---

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

**Available in:** Cloud, [Self-Managed](https://docs.redpanda.com/connect/components/processors/google_drive_download/%20%22View%20the%20Self-Managed%20version%20of%20this%20component%22)

Downloads files from Google Drive that contain matching file IDs.

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

#### Common

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

#### Advanced

```yml
processors:
  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
```

## [](#authentication)Authentication

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

To set up local ADC authentication, use the following `gcloud` commands:

-   Authenticate using Application Default Credentials and grant read-only access to your Google Drive.

    ```bash
    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'
    ```

-   Assign a quota project to the Application Default Credentials when using a user account.

    ```bash
    gcloud auth application-default set-quota-project <project-id>
    ```

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


To use a service account instead, create a JSON key for the account and add it to the [`credentials_json`](#credentials_json) field. To access Google Drive files using a service account, either:

-   Explicitly share files with the service account’s email account

-   Use [domain-wide delegation](https://support.google.com/a/answer/162106) to share all files within a Google Workspace


## [](#fields)Fields

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

The JSON key for your service account (optional). If left empty, Application Default Credentials are used. For more details, see [Authentication](#authentication).

> ⚠️ **CAUTION**
>
> This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see [Manage Secrets](https://docs.redpanda.com/cloud-data-platform/develop/connect/configuration/secret-management/) before adding it to your configuration.

**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**: `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/cloud-data-platform/develop/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/cloud-data-platform/develop/connect/configuration/interpolation/#bloblang-queries).

**Type**: `string`

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

Whether or not to include shared drives.

**Type**: `bool`

**Default**: `false`

## [](#example)Example

This example downloads all files from a Google Drive.

```yaml
input:
  stdin: {}
pipeline:
  processors:
    - google_drive_search:
        query: "${!content().string()}"
    - mutation: 'meta path = this.name'
    - google_drive_download:
        file_id: "${!this.id}"
        mime_type: "${!this.mimeType}"
output:
  file:
    path: "${!@path}"
    codec: all-bytes
```