Cloud

google_drive_list_labels

Lists labels for a file in Google Drive.

For more about labels, see the Google Drive labels guide.

Authentication

By default, this connector will use Google Application Default Credentials (ADC) to authenticate with Google APIs.

To use this mechanism locally, run these gcloud commands:

# 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.labels.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 can be used to share all files within a Google Workspace.

  • Common

  • Advanced

processor:
  label: ""
  google_drive_list_labels:
    credentials_json: "" # No default (optional)
processor:
  label: ""
  google_drive_list_labels:
    credentials_json: "" # No default (optional)

Fields

credentials_json

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

This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see Manage Secrets before adding it to your configuration.

Type: string