Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2416,6 +2416,7 @@ src/platform/packages/shared/kbn-connector-specs/src/specs/**
src/platform/packages/shared/kbn-connector-specs/src/specs/abuseipdb/** @elastic/workflows-eng
src/platform/packages/shared/kbn-connector-specs/src/specs/alienvault_otx/** @elastic/workflows-eng
src/platform/packages/shared/kbn-connector-specs/src/specs/brave_search/** @elastic/workchat-eng
src/platform/packages/shared/kbn-connector-specs/src/specs/google_drive/** @elastic/workchat-eng
src/platform/packages/shared/kbn-connector-specs/src/specs/greynoise/** @elastic/workflows-eng
src/platform/packages/shared/kbn-connector-specs/src/specs/jina/** @elastic/jinastic
src/platform/packages/shared/kbn-connector-specs/src/specs/notion/** @elastic/workchat-eng
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
**Third-party search**
* [Brave Search](/reference/connectors-kibana/brave-search-action-type.md): Search the web using the Brave Search API.
* [Jina Reader](/reference/connectors-kibana/jina-action-type.md): Convert web pages into markdown from their URL and search the web for better LLM grounding.
* [Google Drive](/reference/connectors-kibana/google-drive-action-type.md): Search and access files and folders in Google Drive.
* [Notion](/reference/connectors-kibana/notion-action-type.md): Explore content and databases in Notion.
* [Sharepoint online](/reference/connectors-kibana/sharepoint-online-action-type.md): Search across SharePoint sites, pages, and content using the Microsoft Graph API.

Expand Down
67 changes: 67 additions & 0 deletions docs/reference/connectors-kibana/google-drive-action-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
navigation_title: "Google Drive"
mapped_pages:
- https://www.elastic.co/guide/en/kibana/current/google-drive-action-type.html
applies_to:
stack: preview 9.4
serverless: preview
---

# Google Drive connector [google-drive-action-type]

The Google Drive connector enables searching and accessing files and folders in Google Drive.

## Create connectors in {{kib}} [define-google-drive-ui]

You can create connectors in **{{stack-manage-app}} > {{connectors-ui}}**.

### Connector configuration [google-drive-connector-configuration]

Google Drive connectors have the following configuration properties:

Bearer Token
: A Google OAuth 2.0 access token with Google Drive API scopes. Check the [Get API credentials](#google-drive-api-credentials) for instructions.

## Test connectors [google-drive-action-configuration]

You can test connectors as you're creating or editing the connector in {{kib}}. The test verifies connectivity by fetching the authenticated user's information from the Google Drive API.

The Google Drive connector has the following actions:

Search files
: Search for files in Google Drive using Google's query syntax.
- **query** (required): Google Drive query string. Use `fullText contains 'term'` for content search, `name contains 'term'` for filename search, `mimeType='application/pdf'` for type filtering, `modifiedTime > '2024-01-01'` for date filtering. Combine with `and`/`or`.
- **pageSize** (optional): Maximum number of files to return (1–1000). Defaults to 250.
- **pageToken** (optional): Token for pagination from a previous response.
- **orderBy** (optional): Sort order. Valid values: `createdTime`, `createdTime desc`, `modifiedTime`, `modifiedTime desc`, `name`, `name desc`.

List files
: List files and subfolders in a Google Drive folder.
- **folderId** (optional): Parent folder ID. Use `root` for the root folder, or a folder ID from search/list results. Defaults to `root`.
- **pageSize** (optional): Maximum number of files to return (1–1000). Defaults to 250.
- **pageToken** (optional): Token for pagination from a previous response.
- **orderBy** (optional): Sort order: `name`, `modifiedTime`, or `createdTime`.
- **includeTrashed** (optional): Include trashed files in results. Defaults to `false`.

Download file
: Download a file's content. For native files (PDF, DOCX, etc.), downloads the file directly. For Google Workspace documents (Docs, Sheets, Slides), exports to a standard format (PDF for documents, XLSX for spreadsheets).
- **fileId** (required): The ID of the file to download.

Get file metadata
: Get detailed metadata for specific files, including ownership, sharing status, permissions, and descriptions. Use after search or list to inspect specific files.
- **fileIds** (required): Array of file IDs to fetch metadata for. Returns: `id`, `name`, `mimeType`, `size`, `createdTime`, `modifiedTime`, `owners`, `lastModifyingUser`, `sharingUser`, `shared`, `starred`, `trashed`, `permissions`, `description`, `parents`, `labelInfo`, `webViewLink`.

## Connector networking configuration [google-drive-connector-networking-configuration]

Use the [Action configuration settings](/reference/configuration-reference/alerting-settings.md#action-settings) to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations.

## Get API credentials [google-drive-api-credentials]

To use the Google Drive connector, you need a Google OAuth 2.0 access token with Drive API scopes. You can obtain one using the [Google OAuth 2.0 Playground](https://developers.google.com/oauthplayground/):

1. Open the [OAuth 2.0 Playground](https://developers.google.com/oauthplayground/).
2. In the list of APIs, select **Drive API v3** and choose the `https://www.googleapis.com/auth/drive.readonly` scope (or `https://www.googleapis.com/auth/drive` for full access).
3. Click **Authorize APIs** and sign in with your Google account.
4. Click **Exchange authorization code for tokens**.
5. Copy the **Access token** and use it as the **Bearer Token** in the connector configuration.

1 change: 1 addition & 0 deletions docs/reference/toc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
project: 'Kibana reference'
toc:
- file: index.md
Expand Down Expand Up @@ -75,6 +75,7 @@
- file: connectors-kibana/abuseipdb-action-type.md
- file: connectors-kibana/alienvault-otx-action-type.md
- file: connectors-kibana/brave-search-action-type.md
- file: connectors-kibana/google-drive-action-type.md
- file: connectors-kibana/greynoise-action-type.md
- file: connectors-kibana/jina-action-type.md
- file: connectors-kibana/notion-action-type.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export * from './specs/abuseipdb/abuseipdb';
export * from './specs/alienvault_otx/alienvault_otx';
export * from './specs/brave_search/brave_search';
export * from './specs/github/github';
export * from './specs/google_drive/google_drive';
export * from './specs/greynoise/greynoise';
export * from './specs/notion/notion';
export * from './specs/shodan/shodan';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,10 @@ export const ConnectorIconsMap: Map<
'.urlvoid',
lazy(() => import(/* webpackChunkName: "connectorIconUrlvoid" */ './specs/urlvoid/icon')),
],
[
'.google_drive',
lazy(
() => import(/* webpackChunkName: "connectorIconGoogleDrive" */ './specs/google_drive/icon')
),
],
]);
Loading
Loading