Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

All sensitive configuration is stored as Cloudflare Workers secrets.

Setting Secrets

Use the Wrangler CLI to set secrets:

wrangler secret put SECRET_NAME

You’ll be prompted to enter the value securely.

Environment Variables

VariableDescriptionRequired
ENVIRONMENTSet to development to bypass authNo

All Secrets Reference

SecretPurpose
TWILIO_SIDTwilio Account SID
TWILIO_TOKENTwilio Auth Token
TWILIO_FROM_SMSSMS sender number (e.g., +15551234567)
TWILIO_FROM_WHATSAPPWhatsApp sender (e.g., whatsapp:+15551234567)
TWILIO_FROM_EMAILEmail sender address for Twilio/SendGrid
SENDGRID_API_KEYSendGrid API key (for Twilio email)
WHATSAPP_ACCESS_TOKENWhatsApp Business API access token
WHATSAPP_PHONE_NUMBER_IDWhatsApp Business API phone number ID
RESEND_API_KEYResend API key
RESEND_FROMResend sender address
GOOGLE_SERVICE_ACCOUNT_JSONGoogle service account JSON (for Sheets)
ENCRYPTION_KEYToken encryption key (for Instagram)
INSTAGRAM_APP_IDMeta/Instagram app ID
INSTAGRAM_APP_SECRETMeta/Instagram app secret

Notification Channels

Important: The Responders and Digest tabs in the admin UI are only visible when at least one notification channel is configured.

Twilio SMS

wrangler secret put TWILIO_SID
wrangler secret put TWILIO_TOKEN
wrangler secret put TWILIO_FROM_SMS

Twilio WhatsApp

wrangler secret put TWILIO_SID
wrangler secret put TWILIO_TOKEN
wrangler secret put TWILIO_FROM_WHATSAPP

WhatsApp Business API (Meta)

For direct WhatsApp Business API integration:

wrangler secret put WHATSAPP_ACCESS_TOKEN
wrangler secret put WHATSAPP_PHONE_NUMBER_ID

Twilio Email (via SendGrid)

wrangler secret put SENDGRID_API_KEY
wrangler secret put TWILIO_FROM_EMAIL

Resend Email

wrangler secret put RESEND_API_KEY
wrangler secret put RESEND_FROM

Channel Detection

The admin UI automatically detects which channels are available:

ChannelRequired Secrets
Twilio SMSTWILIO_SID + TWILIO_FROM_SMS
Twilio WhatsAppTWILIO_SID + TWILIO_FROM_WHATSAPP
Twilio EmailSENDGRID_API_KEY + TWILIO_FROM_EMAIL
Resend EmailRESEND_API_KEY + RESEND_FROM

Google Sheets Integration

For syncing form submissions to Google Sheets:

wrangler secret put GOOGLE_SERVICE_ACCOUNT_JSON

The value should be the entire JSON content of your Google Cloud service account key file.

Instagram Integration

For automatic event extraction from Instagram posts:

# Generate with: openssl rand -hex 32
wrangler secret put ENCRYPTION_KEY

wrangler secret put INSTAGRAM_APP_ID
wrangler secret put INSTAGRAM_APP_SECRET

Setting up Meta App

  1. Go to Meta for Developers
  2. Create an app with Instagram Basic Display product
  3. Configure OAuth redirect URI: https://your-worker.workers.dev/instagram/callback
  4. Add test users while in development mode