- email.ts: POST to N8N_EMAIL_WEBHOOK_URL instead of Resend API - env.ts: replace RESEND_API_KEY with N8N_EMAIL_WEBHOOK_URL - .env.example: document new env var - Add n8n workflow JSON (Webhook -> Gmail -> Respond) ready to import
31 lines
1.3 KiB
Plaintext
31 lines
1.3 KiB
Plaintext
# ─────────────────────────────────────────────
|
|
# apps/api — Variables de entorno
|
|
# Copia este archivo como .env y rellena los valores.
|
|
# NUNCA expongas estas variables al frontend.
|
|
# ─────────────────────────────────────────────
|
|
|
|
# Servidor
|
|
API_PORT=3001
|
|
NODE_ENV=development
|
|
|
|
# Supabase (self-hosted) — usar service_role key (bypasea RLS)
|
|
SUPABASE_URL=https://tu-supabase.tudominio.com
|
|
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
|
|
# n8n — relé de email vía webhook (n8n se encarga de enviar por Gmail/SMTP)
|
|
# La URL es la del webhook configurado en el workflow de n8n.
|
|
N8N_EMAIL_WEBHOOK_URL=https://n8n.tudominio.com/webhook/naturcalabacera-email
|
|
EMAIL_FROM=Naturcalabacera <reservas@tudominio.com>
|
|
|
|
# Destinatarios de notificaciones (parametrizables, sin hardcodear)
|
|
NOTIFICATION_EMAIL_TENERIFFA=contacto-teneriffa@ejemplo.com
|
|
NOTIFICATION_EMAIL_NATUR=admin@naturcalabacera.com
|
|
NOTIFICATION_EMAIL_POOL_HEATING=jonathan@ejemplo.com # "Jonathan o las chicas"
|
|
|
|
# URL del frontend para CORS
|
|
WEB_ORIGIN=http://localhost:5173
|
|
|
|
# Jobs — runner de notificaciones
|
|
JOB_RUNNER_INTERVAL_MS=300000 # 5 minutos (300000ms)
|
|
JOB_MAX_RETRIES=3
|