Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/DevMauricio03/n8n-whatsapp-ai-agent/llms.txt

Use this file to discover all available pages before exploring further.

All configuration for the n8n WhatsApp AI Agent stack is driven by a single .env file that you copy from .env.example and fill in before your first deploy. Every placeholder that reads CHANGE_ME or references example.com must be replaced with a real value — leaving any placeholder in place will cause services to start with broken or insecure defaults.
Run the following command from the project root to detect any unfilled placeholders before deploying:
grep -nE 'CHANGE_ME|example\.com' .env
The command should produce no output when your .env is fully configured.

Infrastructure Variables

These variables control timezone, public domains, Docker image pins, and the shared credentials for PostgreSQL and Redis.
TZ
string
required
IANA timezone identifier applied to all services in the stack. Used by n8n for scheduled triggers and log timestamps.Example: America/Mexico_City
N8N_DOMAIN
string
required
Fully-qualified public domain on which n8n will be reachable. Caddy provisions a Let’s Encrypt TLS certificate for this domain automatically.Example: n8n.example.com
CHATWOOT_DOMAIN
string
required
Fully-qualified public domain on which the Chatwoot inbox will be reachable. Caddy provisions a separate Let’s Encrypt certificate for this domain.Example: chat.example.com
LETSENCRYPT_EMAIL
string
required
Email address sent to Let’s Encrypt as the certificate contact. You will receive expiry notices at this address if automatic renewal fails.Example: admin@example.com
POSTGRES_IMAGE
string
required
Docker image and tag for the PostgreSQL service. The stack requires the pgvector extension, so use an image from the pgvector/pgvector repository. Avoid latest in production — pin to an explicit tag.Example: pgvector/pgvector:pg15
REDIS_IMAGE
string
required
Docker image and tag for the Redis service. The -alpine variant is recommended for its smaller footprint.Example: redis:7-alpine
CADDY_IMAGE
string
required
Docker image and tag for the Caddy reverse proxy. Caddy handles TLS termination and routes traffic to n8n and Chatwoot.Example: caddy:2-alpine
N8N_IMAGE
string
required
Docker image and tag for the n8n workflow automation service. Use images from the official docker.n8n.io registry.Example: docker.n8n.io/n8nio/n8n:1
CHATWOOT_IMAGE
string
required
Docker image and tag shared by all three Chatwoot containers (chatwoot-prepare, chatwoot-rails, and chatwoot-sidekiq). Pin to a specific release tag.Example: chatwoot/chatwoot:v4.4.0
POSTGRES_USER
string
required
Superuser account created in PostgreSQL. The init scripts use this account to create the n8n, chatwoot, and agent databases.Example: platform
POSTGRES_PASSWORD
string
required
Password for POSTGRES_USER. Must be a long, randomly generated string. All services that connect to PostgreSQL use this single credential.Generate with: openssl rand -hex 32
REDIS_PASSWORD
string
required
Password passed to redis-server --requirepass and included in the Redis connection URL used by Chatwoot Sidekiq. Must be a long, randomly generated string.Generate with: openssl rand -hex 32
N8N_ENCRYPTION_KEY
string
required
Key used by n8n to encrypt all credentials stored in its database. Must be at least 32 random characters. Losing this key means stored credentials cannot be decrypted.Generate with: openssl rand -hex 32
CHATWOOT_SECRET_KEY_BASE
string
required
Secret used by Chatwoot’s Rails application to sign sessions and encrypted data. Must be a long, randomly generated string.Generate with: openssl rand -hex 64
CHATWOOT_ENABLE_ACCOUNT_SIGNUP
boolean
default:"false"
Controls whether the Chatwoot public sign-up page is enabled. Set to false (the default) so that only administrators you create manually can access the inbox.

Workflow Variables

These variables are injected directly into the n8n container’s environment and are accessible from workflow nodes as environment variables. They contain the runtime configuration for the WhatsApp integration and Google Drive source file.
WHATSAPP_GRAPH_API_VERSION
string
required
Version of the Meta Graph API used for all WhatsApp Business Cloud API calls.Example: v22.0
WHATSAPP_PHONE_NUMBER_ID
string
required
The Phone Number ID of the WhatsApp Business Cloud number that sends and receives messages. Found in the Meta Developer console under your WhatsApp app.
GOOGLE_DRIVE_SOURCE_FILE_ID
string
required
Google Drive file ID of the XLSX spreadsheet monitored by the workflow for price updates. Copy the ID from the file’s shareable URL.
PRICE_IMAGE_PACKAGE_1_URL
string
required
Publicly accessible URL for the image sent to customers when they request Package 1 pricing.Example: https://example.com/package-1.png
PRICE_IMAGE_PACKAGE_2_URL
string
required
Publicly accessible URL for the image sent to customers when they request Package 2 pricing.Example: https://example.com/package-2.png
PRICE_IMAGE_ANALYSIS_URL
string
required
Publicly accessible URL for the image sent to customers when they request an analysis price card.Example: https://example.com/analysis.png

Generating Secrets

Use openssl to generate cryptographically random values for every secret field. Run the command once per secret so that each one is unique:
# 32-byte hex string (64 characters) — suitable for POSTGRES_PASSWORD, REDIS_PASSWORD, N8N_ENCRYPTION_KEY
openssl rand -hex 32

# 64-byte hex string (128 characters) — suitable for CHATWOOT_SECRET_KEY_BASE
openssl rand -hex 64
Never reuse the same value across multiple variables. Store the generated secrets in a password manager or secrets vault before pasting them into .env.
N8N_ENCRYPTION_KEY and CHATWOOT_SECRET_KEY_BASE must be backed up in a secure location outside the server. If either key is lost, n8n credentials stored in the database cannot be decrypted and Chatwoot session data will be invalidated — recovery requires rebuilding both services from scratch.

Build docs developers (and LLMs) love