The Felipe Suarez AI Assistant is a sophisticated sales automation system that combines a messenger-style web interface with powerful AI capabilities. It's designed to handle customer interactions, automate appointments, process payments, and manage communications through an integrated n8n workflow system.
- Intelligent Conversational AI: GPT-4o-mini powered sales agent with natural language processing
- Multi-language Support: Automatically adapts to user's language preference
- Real-time Chat Interface: Professional Instagram/Messenger-style UI with animations
- Automated Sales Process: Complete funnel from lead capture to payment processing
- Smart Tool Integration: Calendar, Gmail, and Stripe automation through MCP (Model Context Protocol)
- Session Management: Persistent conversation history with PostgreSQL
- Vector Search: Supabase-powered service documentation retrieval
- Payment Processing: Integrated Stripe payment link generation
- Email Automation: Gmail integration for confirmations and follow-ups
- Calendar Management: Google Calendar integration for appointment scheduling
- Mobile Responsive: Optimized for all device types
- HTML Interface (
index1.html): Modern messenger-style chat interface - Automatic Chat Flow: Pre-programmed conversation sequences
- Webhook Integration: Real-time communication with n8n backend
- Session Tracking: Unique session IDs for conversation continuity
- Main Messenger Workflow: Core AI agent orchestration
- Calendar Agent: Google Calendar integration
- Gmail Agent: Email automation and management
- MCP Tools: Model Context Protocol for tool integration
- Language Model: OpenAI GPT-4o-mini for natural conversations
- Vector Store: Supabase for service documentation retrieval
- Memory System: PostgreSQL chat memory for context retention
- Embeddings: OpenAI embeddings for semantic search
- n8n instance (self-hosted or cloud)
- Google Cloud Console account
- OpenAI API account
- Supabase account
- Stripe account
- PostgreSQL database
- ngrok or similar tunneling service
-
Google Cloud Console Setup:
- Create a new project or select existing
- Enable Google Calendar API
- Enable Gmail API
- Enable Google Drive API
- Create OAuth 2.0 credentials
- Configure OAuth consent screen
-
Google Drive Setup:
- Create service documentation in Google Docs
- Note the document ID for n8n integration
- Ensure proper sharing permissions
-
OpenAI API:
- Sign up at platform.openai.com
- Generate API key
- Note the key for n8n configuration
-
Supabase Setup:
- Create new project
- Set up vector store table:
CREATE TABLE documents ( id SERIAL PRIMARY KEY, content TEXT, metadata JSONB, embedding VECTOR(1536) );
- Generate API keys (anon and service role)
-
Stripe Configuration:
- Create Stripe account
- Get publishable and secret keys
- Set up webhook endpoints
-
Main Messenger Workflow:
- Import
Messenger (38).json - Configure webhook endpoint
- Set up all credential connections
- Import
-
Calendar Agent:
- Import
Calendar Agent (1).json - Configure Google Calendar credentials
- Set up MCP trigger endpoint
- Import
-
Gmail Agent:
- Import
Gmail Agent (1).json - Configure Gmail OAuth credentials
- Set up MCP trigger endpoint
- Import
- OpenAI API: Add API key to OpenAI Chat Model nodes
- Google Services: Configure OAuth2 for Calendar and Gmail
- Supabase: Add project URL and API keys
- PostgreSQL: Configure database connection for chat memory
- Stripe: Add secret key for payment processing
The system uses MCP for tool integration. Each agent needs an endpoint:
- Calendar Agent MCP:
https://your-ngrok-url/mcp/e501a93c-a5b6-4483-b6b5-2cfa26dad807 - Gmail Agent MCP:
https://your-ngrok-url/mcp/a34e27e7-ee1e-4796-9826-c9b0203e881b - Stripe MCP:
https://your-ngrok-url/mcp/b3cfbb40-8a85-4216-86d1-0fdaae28a44e
In the main Messenger workflow, update the MCP Client Tool nodes with your ngrok URLs.
-
Upload Assets:
- Host
index1.htmlon your web server - Include required images (
1.jpg,3.jpg,resume.pdf) - Ensure proper CORS configuration
- Host
-
Configure Webhook URL:
- Update the webhook URL in the JavaScript section:
return fetch("YOUR_NGROK_URL/webhook/4eb21d65-6dfe-4816-88cf-323664347d0d", {
- Ensure HTTPS for production deployment
- Configure proper CORS headers
- Set up CSP headers for security
-
Prepare Documentation:
- Create comprehensive service descriptions
- Include pricing information
- Format in clear, searchable text
-
Upload to Vector Store:
- Use the Google Drive download node
- Process through the document loader
- Store in Supabase vector store
- Chat Interface: Verify message flow and UI responsiveness
- AI Responses: Test conversation quality and context retention
- Tool Integration: Validate calendar, email, and payment functions
- Error Handling: Test fallback scenarios
- All credentials configured and working
- MCP endpoints responding correctly
- Vector store populated with current data
- Payment processing tested in sandbox
- Email notifications working
- Calendar integration functional
- Mobile responsiveness verified
- SSL certificates installed
- Error monitoring configured
The AI agent is configured with a detailed system prompt that includes:
- Identity: Felipe Suarez, AI Developer persona
- Sales Process: Value-first approach with structured workflow
- Tool Integration: Specific parameter schemas for MCP tools
- Communication Style: Professional, concise, under 80 characters per message
- Error Handling: Graceful fallbacks when tools fail
- Session Management: PostgreSQL-based chat memory
- Context Retention: Conversation history preserved across sessions
- Vector Retrieval: Semantic search for service information
- Personalization: User identification and customized responses
- Stripe Integration: Automated payment link generation
- Service Confirmation: Price confirmation before payment processing
- Receipt Management: Automated email confirmations
- Greeting: Automated welcome message
- Information Gathering: Service inquiry and needs assessment
- Value Presentation: Detailed service explanation with benefits
- Price Confirmation: Clear pricing with service details
- Payment Processing: Stripe payment link generation
- Appointment Scheduling: Calendar integration for consultations
- Follow-up: Email confirmations and next steps
- Automatic Mode: Pre-scripted conversation flow
- Interactive Mode: Real-time AI responses triggered by user input
- Seamless Transition: Automatic detection and mode switching
- Vector Store Updates: Refresh service documentation monthly
- Credential Rotation: Update API keys as needed
- Performance Monitoring: Track response times and error rates
- Content Updates: Modify conversation flows based on feedback
- Database Optimization: Index chat memory tables for performance
- Rate Limiting: Implement API rate limiting for high traffic
- Caching: Add Redis caching for frequently accessed data
- Load Balancing: Scale n8n instances for high availability
- MCP Connection Failures: Check ngrok tunnel status and URLs
- Calendar Integration: Verify Google OAuth scopes and permissions
- Payment Processing: Confirm Stripe webhook configurations
- Vector Search: Ensure embeddings are properly generated
- n8n Execution Logs: Monitor workflow execution status
- Frontend Console: Check browser console for JavaScript errors
- API Response Codes: Monitor webhook response status
- Database Logs: Track PostgreSQL connection and query issues
- Conversation Completion Rate: Users who complete the sales funnel
- Payment Conversion: Successful payment processing rate
- Response Quality: User satisfaction with AI responses
- Tool Usage: Frequency of calendar and email integrations
- Session Analytics: Track user engagement and conversation length
- Error Rates: Monitor tool failures and system issues
- Performance Metrics: Response times and system load
This documentation provides a complete guide for setting up and managing the Felipe Suarez AI Assistant system. The modular architecture allows for easy customization and scaling based on specific business requirements.