Skip to main content

Google Drive

Load data from Google Drive.

Make sure to setup the Google Drive API before using this data source.

To create a service account key, follow these instructions.

Configure via UI

google_drive

Configure via API / Client

from llama_cloud.types import (
CloudGoogleDriveDataSource,
ConfigurableDataSourceNames,
DataSourceCreate,
)

ds = DataSourceCreate(
name="<your-name>",
source_type=ConfigurableDataSourceNames.GOOGLE_DRIVE,
component=CloudGoogleDriveDataSource(
folder_id="<your-folder-id>",
service_account_key={
"type": "service_account",
"project_id": "<your-project-id>",
"private_key": "<your-private-key>",
...
},
),
)
data_source = client.data_sources.create_data_source(request=ds)