{% extends "base.html" %} {% block title %}Google Drive Setup{% endblock %} {% block content %}

Google Drive Integration Setup

Configure the Google Drive integration for DocuElevate using our setup wizard.

Note: There are two ways to authenticate with Google Drive. This wizard will guide you through OAuth setup, which is recommended for most users. For service account setup, please refer to the documentation.

Authentication Method

{% if is_configured %} Configured {% else %} Not Configured {% endif %}

Step 1: Create a Google Cloud Project

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Make note of your project ID

Step 2: Enable the Google Drive API

  1. In your project, go to "APIs & Services" > "Library"
  2. Search for "Google Drive API" and select it
  3. Click the "Enable" button

Step 3: Configure OAuth Consent Screen

  1. In "APIs & Services", go to "OAuth consent screen"
  2. Select "External" user type (or "Internal" if this is for an organization)
  3. Fill out the required application information:
    • App name: "DocuElevate" (or your preferred name)
    • User support email: Your email
    • Application homepage link: Your application URL
    • Authorized domains: Your domain
    • Developer contact information: Your email
  4. Click "Save and Continue"
  5. On the Scopes screen, click "Add or Remove Scopes" and add:
    • https://www.googleapis.com/auth/drive.file
  6. Click "Save and Continue" through the rest of the setup

Step 4: Create OAuth Credentials

  1. Go to "APIs & Services" > "Credentials"
  2. Click "Create Credentials" > "OAuth client ID"
  3. Select "Web application" for Application type
  4. Add a name (e.g., "DocuElevate Web Client")
  5. Under "Authorized redirect URIs" add:
    {{ request.url.scheme }}://{{ request.url.netloc }}/google-drive-callback
  6. Click "Create"
  7. Copy your Client ID and Client Secret

Step 5: Complete OAuth Setup

Now enter your Client ID and Client Secret below, and we'll help you complete the OAuth flow. You can set the folder ID after authentication is complete.

Optional: You can set this after authentication if you prefer

Service Account Configuration

Service accounts allow for server-to-server authentication without user involvement. This method is useful for background tasks.

Service account configuration requires creating a service account in Google Cloud Console and uploading credentials. For detailed instructions, refer to the documentation.

This is the ID from the Google Drive folder URL where files will be saved

{% if has_credentials_json %} Service account credentials are configured in your .env file. {% else %} No service account credentials found. You need to manually add them to your .env file. {% endif %}

View Service Account Setup Documentation

Connection Status

{% if is_configured %} {% else %} {% endif %}

{% if is_configured %} Google Drive integration is properly configured! Your credentials are valid. {% else %} Google Drive integration is not completely configured or credentials may be invalid. {% endif %}

OAuth Configuration for Worker Nodes

Copy these environment variables to configure all worker nodes:

GOOGLE_DRIVE_USE_OAUTH=true
GOOGLE_DRIVE_CLIENT_ID={{ client_id_value }}
GOOGLE_DRIVE_CLIENT_SECRET={{ client_secret_value|default('YOUR_CLIENT_SECRET', true) }}
GOOGLE_DRIVE_REFRESH_TOKEN={{ refresh_token_value|default('YOUR_REFRESH_TOKEN', true) }}
GOOGLE_DRIVE_FOLDER_ID={{ folder_id|default('YOUR_FOLDER_ID', true) }}

Add these variables to your .env file or environment configuration.

Service Account Configuration for Worker Nodes

Copy these environment variables to configure all worker nodes:

GOOGLE_DRIVE_USE_OAUTH=false
GOOGLE_DRIVE_FOLDER_ID={{ folder_id|default('YOUR_FOLDER_ID', true) }}
# Make sure to add your GOOGLE_DRIVE_CREDENTIALS_JSON to your .env file

Add these variables to your .env file along with your service account credentials JSON.

Need More Information?

For detailed instructions and troubleshooting, refer to the Google Drive Setup Documentation.

Back to Status
{% endblock %} {% block scripts %} {% endblock %}