Configuring AI keys

Admins configure the Email Campaigns app — including all of its AI features — in Settings → Apps → Email Campaigns. The app exposes a set of variables that power sending, lead generation, and AI analysis.

App variables

VariableWhat it powers
SMTP_HOSTDefault sending account: mail server hostname
SMTP_PORTDefault sending account: mail server port
SMTP_USERDefault sending account: username
SMTP_PASSDefault sending account: password (secret)
DEFAULT_FROM_NAMEDefault sender display name for campaigns
DEFAULT_FROM_EMAILDefault sender address for campaigns
GOOGLE_MAPS_API_KEYGrid loading in Google Places Leads — geocodes cities and searches businesses
OPENROUTER_API_KEYFallback AI provider (openrouter.ai)
OPENAI_API_KEYFallback AI provider (platform.openai.com)
LITELLM_API_KEYPrimary AI gateway key — get from your Cocolevio admin
LITELLM_BASE_URLPrimary AI gateway endpoint URL — get from your Cocolevio admin

Setting up the AI gateway (primary)

LITELLM_API_KEY and LITELLM_BASE_URL connect the app to Cocolevio's AI gateway. Request both values from your Cocolevio administrator — they are not published in these docs. Once both are set, all AI features (LinkedIn Leads, Google Places analysis) use the gateway first, with automatic model switching.

OPENAI_API_KEY and OPENROUTER_API_KEY are optional fallbacks: if the gateway variables are missing, features try direct OpenAI, then OpenRouter.

Setting up Google Maps

GOOGLE_MAPS_API_KEY is required for the grid-loading step in Google Places leads. The key must have both of these enabled in the Google Cloud Console:

  • Places API
  • Geocoding API

If either is missing, grid loading fails.

Setting up default sending

The SMTP_* and DEFAULT_FROM_* variables define the fallback sending account used when a campaign doesn't specify a connected account. For per-user sending accounts, see Connected emails.

Good to know

  • Secrets are encrypted. Variables marked as secrets (passwords and API keys) are stored encrypted in the database.
  • Changes apply on next run. Updated values take effect the next time a feature runs — no restart needed for app variables.
  • Per-search override. The LinkedIn Leads page has a provider and model dropdown that overrides the configured chain for a single search.