Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KevinhosUTP/Automatizacion-Lurwis/llms.txt
Use this file to discover all available pages before exploring further.
Environment Variables
Comprehensive guide to all environment variables required for Automatización Lurwis.n8n Core Configuration
Basic Settings
Advanced Settings
WhatsApp Business API
Meta Platform Credentials
How to Obtain Credentials
Access Meta Developer Console
- Go to Meta for Developers
- Navigate to your WhatsApp Business App
Get Access Token
- Go to WhatsApp → API Setup
- Copy the temporary access token
- For production: Generate a permanent token
Get Phone Number ID
- In API Setup, find your test phone number
- Copy the Phone number ID (visible in workflow:
947279508470714)
The webhook must return a 200 status with the
hub.challenge parameter for Meta verification to succeed.Database Connections
PostgreSQL (Orders & Menu)
The workflows use a session pooler connection with Row Level Security (RLS) enabled as noted in the workflow comments.
Tables Used by Workflows
The PostgreSQL database includes:pedidos_picanteria- Customer orderscategorias- Menu categoriesplatos- Menu itemsplato_precios- Item pricing by size
MongoDB (Conversation Memory)
Memory Collections
The system uses separate MongoDB collections for each conversation context:| Collection | Purpose | Context Window |
|---|---|---|
historial_clasificador | Message intent classification | Default |
historial_detector | Order detection | Default |
historial_pedidos | Order conversations | 25 messages |
historial_eventos | Venue event bookings | 15 messages |
historial_reservas | Table reservations | 15 messages |
historial_general | General inquiries | 10 messages |
Each agent has its own collection to maintain precise conversation context and enable accurate metrics.
Redis (Message Buffer)
Connection Settings
Buffer Configuration
The Receptor workflow uses Redis for message buffering:- Purpose: Aggregate rapid messages into a single context
- Buffer Window: 8 seconds (configurable)
- TTL Values:
buffer_{userId}: 30 secondsts_{userId}: 30 seconds (timestamp)meta_{userId}: 120 seconds (metadata)
AI & Language Models
Google Gemini
How to Get Gemini API Key
Access Google AI Studio
Visit Google AI Studio
Agent Models
The Procesador workflow uses different models for different agents:- Clasificador (Classifier): Fast model for intent detection
- Agente Pedidos (Orders): Pro model with reasoning capability
- Other Agents: Fast models (General, Reservations, Events)
Optional Services
Error Notifications
Monitoring & Logging
Environment-Specific Configurations
Development
Staging
Production
Environment File Template
Create a.env file with all required variables:
Credential Security Best Practices
Use Environment-Specific Files
Use Environment-Specific Files
Separate credentials for development, staging, and production:
Rotate Credentials Regularly
Rotate Credentials Regularly
- API tokens: Every 90 days
- Database passwords: Every 6 months
- Webhook tokens: After any security incident
Use Secret Management
Use Secret Management
For production, consider:
- AWS Secrets Manager
- HashiCorp Vault
- Azure Key Vault
- Google Cloud Secret Manager
Restrict Access
Restrict Access
- Use read-only database credentials where possible
- Apply least-privilege principle
- Enable RLS (Row Level Security) on PostgreSQL
Verification Checklist
Before deploying, verify all credentials:- n8n authentication configured
- WhatsApp webhook verified with Meta
- PostgreSQL connection successful
- MongoDB collections created
- Redis connection active
- Google Gemini API key valid
- All environment-specific values set
- SSL/TLS enabled for production databases
- Backup credentials stored securely
Next Steps
Production Deployment
Deploy to production with security best practices
Database Schema
Review complete database structure
Troubleshooting
Debug common credential issues
WhatsApp Integration
Detailed WhatsApp setup guide