Skip to main content

Usage Guide - Google Drive Activities

IntelliBuddies supports the following Google authentication types as part of our Google Context activity:

It is better to understand these authentication types to use Google Drive activities efficiently. Follow the instructions below to know when to use which authentication.

API Key

API Key is restricted to read-only access to your Google Drive data, and we can do only a limited set of operations since it requires no authentication. Hence, you can use authentication only on the following activities:

Prerequisites to Access Files and Folders using API Key

  • To access your data using API Key, right-click your drive folder where you want to perform read-only operations. Click on Share and make the folder available to Anyone with the link under General access. Now user can be able to access all the files and folders which are present inside this folder.

  • API Key only allows you to access the file or folder through the File / Folder Id.
note

You cannot use the Path to access the file or folder.

OAuth 2.0

  • OAuth 2.0 does both authentication and authorization.
  • We can access drive data on behalf of the end user.
  • By using OAuth, you can use all the Google activities supported by IntelliBuddies.

Limitation

  • Users cannot delete files or folders which they do not own.

Service Account

Service Account is like a new user account created for specific services inside Google Drive. The advantage of Service Account over API Key is:

  • You can perform both read and write operations using Service Account.
  • You can use all the Google activities supported by IntelliBuddies with Service Account.
  • You can access your Google Drive data by specifying either Id or Path inside the activities.

Prerequisites To Access Files and Folders

note

This section is only required if you use Service Account without user impersonation.

To access your Google drive data, you need to share a folder with the Service Account.

Limitations

Service Account has following limitations:

  • You can access the user's data using the service account if the user has shared the data with the service account.
  • Whenever you create, copy, move or upload a file inside that shared folder using a service account, then the file will be stored in the service account drive, not in their standard drive account, and the file will belong to the service account.
  • There is a size quota limitations with Service Account, and hence you will not be able to upload anything more than 1 GB of data using the Service Account.
  • Users cannot delete files or folders which they do not own.
tip

You can overcome the above limitations in the case of Google Workspace accounts by impersonating the service account with a user account.

User Impersonation

  • You can impersonate a service account with a user account to perform operations on Google Drive. This way, you can access the impersonated user's drive data without sharing the folder with the service account.
note

The impersonation is supported only for Google Workspace accounts only after enabling domain-wide delegation.

  • By performing domain-wide delegation, you are granting access to the service account to access your account data by impersonating a user from your domain. You can impersonate any user in the domain and able to access the data. You can refer to About domain-wide delegation for more information.
  • Using Service Account, you can use all the Google activities supported by IntelliBuddies.

Google Drive - File and Folder Paths

note

OAuth2.0 ClientIDs and Service Account accept File / Folder path. But API Key does not accept the File / Folder path.

Users can provide the file or folder location as part of the path property of all the Google activities

  • The user can specify the file or folder's absolute location or relative location.
tip

For example, to access a demo file in the My Drive directory, the user can give either "My Drive/Test/demo" or "Test/demo" and the same for Shared with me files and folders.

For Service Accounts without domain-wide delegation, specify the shared folder path. If the above "My Drive/Test" folder is shared with your service account and you want to access the Databases List file, specify "Test/Databases List" not "My Drive/Test/Databases List" since you shared this folder to your service account.

Google Drive - File and Folder Id

note

All authentications as part of our Google Context accepts File / Folder ID.

Please refer to the following GIFs to see how to extract File or Folder Id from your Google Drive data.

  • File Id

  • Folder Id