# ============================================================================= # Gmail Automation Platform - Environment Configuration # ============================================================================= # Copy this file to ".env" and fill in your own values. # NEVER commit your real ".env" file to Git. # ============================================================================= # ---- General ----------------------------------------------------------- APP_ENV=development APP_HOST=0.0.0.0 APP_PORT=8000 APP_DEBUG=true LOG_LEVEL=INFO # ---- Security ------------------------------------------------------------ # Random string used to protect internal tokens. Generate one with: # python -c "import secrets; print(secrets.token_hex(32))" SECRET_KEY=replace-with-a-random-64-character-hex-string # Optional: require this key (via the "X-API-Key" header) to call /emails/* endpoints. # Leave blank while developing locally. API_KEY= # Comma-separated list of origins allowed to call this API from a browser. ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8000 # ---- OpenAI -------------------------------------------------------------- # Get your key from https://platform.openai.com/api-keys OPENAI_API_KEY=sk-your-openai-api-key-here OPENAI_MODEL=gpt-4.1-mini # ---- Google / Gmail API ---------------------------------------------------- # Create these in Google Cloud Console - see docs/GOOGLE_CLOUD_SETUP.md GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=your-google-client-secret GOOGLE_REDIRECT_URI=http://localhost:8000/auth/google/callback GOOGLE_SCOPES=https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.send,https://www.googleapis.com/auth/gmail.modify,https://www.googleapis.com/auth/gmail.labels # Where the OAuth token cache is stored after you log in once (auto-created). GOOGLE_TOKEN_STORE_PATH=./data/token.json # ---- Database --------------------------------------------------------- DATABASE_PATH=./data/gmail_automation.db # ---- Automation (n8n / Zapier / Make) ----------------------------------- # Shared secret that external automation tools must send in each webhook call. AUTOMATION_WEBHOOK_SECRET=replace-with-a-random-webhook-secret # ---- Feature defaults --------------------------------------------------- DEFAULT_TRANSLATE_LANGUAGE=English AUTO_REPLY_ENABLED=false MAX_EMAILS_PER_FETCH=10