AI-powered WhatsApp Assistant built with n8n, OpenAI, and WhatsApp Cloud API. Supports text, voice, and images with multimodal responses, memory, and tools like web search & knowledge base. WhatsApp AI Assistant π€π¬
An AI-powered WhatsApp Assistant built with n8n . This project integrates OpenAI, WhatsApp Cloud API, and Pinecone to create a multimodal conversational bot called Sam, capable of handling:
π€ Voice messages β Transcribed & answered in text or voice
πΌοΈ Images β Analyzed and described with AI
π¬ Text messages β Smart AI responses with context
π§ Memory β 20-message context per user
π Tools β Web search, calculator, knowledge base
β¨ Features
β Supports Text, Image, and Audio inputs
β Replies in Text or Audio (depending on how the user interacts)
β Uses OpenAI GPT-4o-mini for conversations
β Vision AI to analyze and describe images
β Whisper (ASR) to transcribe voice messages
β Text-to-Speech to reply with natural voice
β Pinecone Knowledge Base for custom context
β Web Search + Calculator tools
π οΈ Tech Stack
n8n β Workflow automation
WhatsApp Cloud API β Messaging integration
OpenAI GPT β AI language model
OpenAI Whisper β Audio transcription
OpenAI TTS β Text-to-speech
Pinecone β Vector database for knowledge base
SerpAPI β Web search
π Setup Instructions
-
Clone the Repository git clone https://github.com/your-username/whatsapp-ai-assistant.git cd whatsapp-ai-assistant
-
Import Workflow into n8n
Open n8n
Import the workflow.json file
- Configure Credentials
Youβll need to set up the following credentials inside n8n:
WhatsApp Cloud API
OpenAI API
SerpAPI (for web search)
Pinecone API
- Deploy WhatsApp Webhook
Connect your WhatsApp Business Cloud API to n8n
Set webhook URL in Meta Developer Dashboard
- Start n8n n8n start
π Usage
Send a text, voice note, or image to your WhatsApp number.
The AI assistant (Sam) will analyze and respond.
Text β gets a text reply
Voice β gets a voice reply
Image β gets a description + contextual answer
π· Demo (Optional)
Add a screenshot or GIF here once you test it.
πΊοΈ Roadmap
Add support for document files (PDF, DOCX)
Multi-language support π
Deploy as Docker container
π€ Contributing Thanks
Pull requests are welcome! For major changes, please open an issue first to discuss what youβd like to change.
π License
MIT License β free to use and modify.