Configure Google Drive credentials for your workspace

Written By Stanislas

Last updated 3 days ago

Google Drive is a powerful cloud storage service that integrates with Swiftask to help your agents access and process files. By configuring custom OAuth 2.0 credentials, your organization maintains full control over the authentication process and ensures secure, compliant data access for all workspace members.

Why configure custom credentials? When you set up your own Google credentials instead of using Swiftask's default ones, you gain complete visibility and control over how your organization's data is accessed. This is especially important for enterprises with strict security or compliance requirements.


Prerequisites

Before you start, you need:

  • Admin or Owner role in your Swiftask workspace

  • Access to Workspace administration

  • Administrative access to your organization's Google Cloud Console

  • A Google account with permission to create a Google Cloud project


Step 1: Access workspace administration

This is where you configure authentication for your entire workspace.

  1. Click the Settings icon at the bottom of the left sidebar

  2. Select Workspace administration from the menu

  3. Look for the Settings or Authentication section in the left navigation

Once you're in workspace administration, you'll see options to manage workspace-wide settings, including external authentication methods like Google Drive.


Step 2: Locate the Google Drive authentication settings

In the workspace administration panel:

  1. Navigate to Settings β†’ Authentication (or similar section depending on your interface)

  2. Look for Google Drive in the list of available external applications

  3. Click Configure next to Google Drive

A dialog or form will open where you can enter your Google credentials.


Step 3: Get your Google credentials from Google Cloud Console

You need to create OAuth 2.0 credentials in Google Cloud. Follow these steps:

3.1 Create a Google Cloud project

  1. Go to Google Cloud Console

  2. Sign in with your organization's Google administrator account

  3. Click the project selector in the top left

  4. Click New Project

  5. Enter a descriptive name (for example: [Organization Name] - Google Drive Integration)

  6. Click Create

Wait a few seconds for the project to be created. It will be automatically selected when ready.

3.2 Enable the required Google APIs

In the left sidebar, go to APIs & Services β†’ Library

Search for and enable each of these APIs:

  • Google Drive API

  • Google Sheets API

  • Google Docs API

  • Google Slides API

For each API:

  1. Click on it in the results

  2. Click the Enable button

  3. Wait for confirmation

You should see a message: "[API Name] is now enabled for this project"

3.3 Create OAuth 2.0 credentials

  1. Go to APIs & Services β†’ Credentials

  2. Click + Create Credentials at the top

  3. Select OAuth client ID

If you haven't set up the OAuth consent screen yet, Google will ask you to configure it first:

  1. Click Configure Consent Screen

  2. Select Internal as the user type ( No need for google validation)

  3. Click Create

Fill in the required information:

Field What to enter

App name

[Organization Name] - Google Drive Sync

User support email

Your admin email address

Developer contact

Your admin email address

Click Save and Continue.

3.4 Add Google Drive scopes

  1. At the "Scopes" step, click Add or Remove Scopes

  2. Search for and select these four scopes:

    • https://www.googleapis.com/auth/drive.file

    • https://www.googleapis.com/auth/drive - Full Drive access for file operations

    • https://www.googleapis.com/auth/spreadsheets - Full Google Sheets access

    • https://www.googleapis.com/auth/documents - Full Google Docs access

    • https://www.googleapis.com/auth/presentations - Full Google Slides access

    • https://www.googleapis.com/auth/userinfo.email

    • https://www.googleapis.com/auth/userinfo.profile

  3. Click Save and Continue

  4. On the "Test users" page, you can add test accounts if needed (optional)

  5. Click Back to Dashboard when done

3.5 Create your OAuth client ID and secret

  1. Go back to APIs & Services β†’ Credentials

  2. Click + Create Credentials

  3. Select OAuth client ID

  4. For "Application type", select Web application

  5. Under "Authorized redirect URIs", click Add URI and enter:

    https://graphql.swiftask.ai/app/integrations/connect

    Click Create

A dialog will show your credentials:

  • Client ID (public identifier)

  • Client Secret (private key)

Important: Copy both values to a secure location. The Client Secret won't be shown again after you close this window.

3.6 Configure the OAuth Consent Screen Audience

After creating your consent screen, you need to configure who can access your application. This step is critical for security.

Setting the User Type to "Internal"

When selecting the user type for your OAuth consent screen:

  • Select Internal β€” This means only users within your Google Workspace organization (i.e., accounts sharing the same domain as your workspace) will be able to authenticate.

  • This option does not require Google's validation of your app, which simplifies the setup process significantly.

  • Access is automatically restricted to emails matching your organization's domain (e.g., @yourcompany.com).

βœ… Recommended for organizations using Google Workspace (formerly G Suite). If your team uses @yourcompany.com accounts managed through Google Workspace, selecting Internal ensures that only members of your organization can connect Google Drive to Swiftask.


⚠️ Special case: Personal Gmail accounts (@gmail.com)

If your organization uses personal Gmail accounts (e.g., user@gmail.com) instead of a managed Google Workspace domain, the Internal option is not available.

In that case:

  1. Select External as the user type

  2. Your app will be in Testing mode by default

  3. Navigate to the "Test users" step in the consent screen setup

  4. Click + Add Users

  5. Enter each Gmail address that should have access to connect Google Drive in Swiftask

  6. Click Save

⚠️ Important: In Testing mode, only the email addresses explicitly listed as test users will be able to authenticate. Up to 100 test users can be added. If you need more users, you would need to publish the app (which requires Google's verification).


Summary table

ScenarioUser TypeWho gets access

Google Workspace domain (e.g. @company.com)

Internal

All users with the same domain automatically

Personal Gmail accounts (@gmail.com)

External (Testing mode)

Only explicitly listed test users


πŸ’‘ Tip: If you are unsure which scenario applies to your organization, check whether your Google account is managed by an administrator. Go to myaccount.google.com and look for "Managed by your organization" β€” if you see this, you are on a Google Workspace domain and should use Internal.

Step 4: Enter your credentials in Swiftask

Now go back to the Swiftask workspace administration where you left off:

  1. You should still see the Google Drive configuration dialog

  2. Paste your Client ID in the "Client ID" field

  3. Paste your Client Secret in the "Client Secret" field

  4. Click Save

You'll see a confirmation message. Google Drive is now configured for your workspace.


Step 5: Test your connection

To verify everything is working:

  1. Go to Settings β†’ External Accounts or Connections (depending on your interface)

  2. Look for the option to add or connect a Google Drive account

  3. Click Connect Google Drive or Add Account

  4. You'll be redirected to Google to authorize access

  5. Sign in and authorize Swiftask to access your Google Drive

  6. You'll be redirected back to Swiftask

Once connected, your workspace members can now use Google Drive integrations with your organization's credentials.


Update or remove credentials

To update your credentials:

  1. Go to Workspace administration β†’ Settings β†’ Authentication

  2. Find Google Drive in the list

  3. Click Edit or Configure

  4. Enter the new Client ID and Client Secret

  5. Click Save

To remove the configuration:

  1. Click Delete next to Google Drive

  2. Confirm the deletion

  3. Swiftask will revert to using default credentials


Security best practices

Do:

  • Use dedicated credentials for each workspace

  • Restrict Google Cloud project access to your admin team only

  • Regularly review who has access in Google Cloud Console

  • Use a group email address (not personal) for admin contacts

  • Document who configured the credentials and when

Don't:

  • Share the Client Secret with non-administrators

  • Use personal Google accounts for organization credentials

  • Reuse the same credentials across multiple projects

  • Leave credentials unprotected or undocumented

The Client Secret is encrypted in the Swiftask database and never displayed after initial save. Only workspace administrators can access it.


Troubleshooting

"Invalid redirect URI" error

What this means: The redirect URL you entered in Google Cloud doesn't match what Swiftask is using.

How to fix it:

  1. Go to Google Cloud Console β†’ APIs & Services β†’ Credentials

  2. Click on your OAuth client ID to edit it

  3. Verify that this exact URL is listed under "Authorized redirect URIs":

    https://graphql.swiftask.ai/app/integrations/connect
  4. If it's missing, click Add URI and add it

  5. Save the changes

  6. Try connecting again in Swiftask

"Invalid Client ID" error

What this means: The Client ID you entered is incorrect or the Google Cloud project is no longer active.

How to fix it:

  1. Copy the Client ID again from Google Cloud Console (make sure there are no extra spaces)

  2. Verify that Google Drive API is still enabled in your project

  3. Check that your Google Cloud project is still active

  4. Re-enter the credentials in Swiftask and save

"Permission denied" after connecting

What this means: The scopes (permissions) aren't properly configured in Google Cloud.

How to fix it:

  1. Go to Google Cloud Console β†’ APIs & Services β†’ OAuth consent screen

  2. Make sure all four required scopes are added (see Step 3.4 above)

  3. Save your changes

  4. Disconnect your Google account from Swiftask

  5. Go to myaccount.google.com/permissions

  6. Find Swiftask and click to see details

  7. Click Remove access

  8. Connect again to Swiftask and authorize with the updated scopes


Key concepts

OAuth 2.0: A secure protocol that lets applications access Google Drive without storing your password.

Client ID: A public identifier for your application. It's safe to share this.

Client Secret: A private password for your application. Keep this secure and never share it.

Scopes: Permissions that define what your application can do (read files, write files, access profile, etc.).


Next steps

Once Google Drive is configured, your workspace members can:

  • Use Google Drive as a data source for agents

  • Export agent outputs to Google Docs and Google Sheets

  • Integrate Google Drive files into knowledge bases

This guide is for workspace administrators. If you need help, contact your system administrator.