{% extends "base.html" %} {% block title %}Google Drive Setup{% endblock %} {% block content %}
Configure the Google Drive integration for DocuElevate using our setup wizard.
Current Status:
Google Drive integration is {% if is_configured %} configured. {% else %} not configured. {% endif %}
{% if use_oauth %}Authentication Type: OAuth Flow (User Account)
{% else %}Authentication Type: Service Account (Server-to-Server)
{% endif %} {% if folder_id %}Target folder ID: {{ folder_id }}
{% endif %}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.
https://www.googleapis.com/auth/drive.fileNow 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 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{% 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 %}
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.
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.
For detailed instructions and troubleshooting, refer to the Google Drive Setup Documentation.