Process description This automation is a full-fledged AI consultant for an electronics store on WhatsApp. The system automatically receives customer messages, processes various types of content (text, images, voice messages), consults based on the current product database in Supabase, provides personalized recommendations and automatically notifies about ready-to-buy leads on Telegram.
API keys and services: WhatsApp Business Cloud API - for receiving and sending messagesOpenAI API Key - for gpt-4o-mini and gpt-4o modelsSupabase API - for a product databasePinecone API - for the store's knowledge baseTelegram Bot API - for lead notificationsGoogle Sheets OAuth2 - for managing newslettersSystem architecture by blocks SECTION 1: RECEIVING MESSAGES 1.1 WhatsApp Trigger — Receiving messages Purpose: Automatically receives incoming messages from customers on WhatsApp via webhook
WhatsApp Trigger settings:
Updates: ["messages"] (message updates)Webhook ID: 1a933f26-706e-44a9-81ac-ede4b7e5ecdbCredentials: whatsappTriggerAPI account 4What we get:
{
“contacts”: [{"wa_id”: “79001234567", “profile”: {"name”: “Ivan Petrov"}}],
“messages”: [{
“id”: “wamid.xxx”,
“type”: “text”,
“text”: {"body”: “I want to buy a smartphone up to 30,000 rubles"},
“timestamp”: “1672531200"
}]
}
1.2 Edit Fields — Data preparation Purpose: Retrieves chat_id to personalize the conversation
Set settings:
{
“assignments”: [{
“name”: “chat_id1",
“value”: “= {{$json.contacts [0] .wa_id}}”,
“type”: “string”
}]
}
SECTION 2: HANDLING DIFFERENT TYPES OF MESSAGES 2.1 Switch - Content type definition Purpose: Analyzes the type of incoming message and sends it to the appropriate stream
Switch conditions:
Image (Output 0): messages [0] .type === “image” → image processingText (Output 1): messages [0] .type === “text” → straight to AI AgentVoice (Output 2): messages [0] .type === “audio” → audio transcriptionSECTION 3: IMAGE PROCESSING 3.1 Image analysis flow WhatsApp Business Cloud5 → HTTP Request3 → OpenAI3
WhatsApp Business Cloud5:
Resource: mediaOperation: MediaURLGetMedia Get ID: = {{$ ('WhatsApp Trigger1') .item.json.messages [0] .image.id}}HTTP Request3:
URL: = {{$json.url}} (downloads image)Authentication: whatsappAPIOpenAI3:
Resource: imageOperation: analyzeModel: gpt-4oText: “Analyze and describe what you see in the picture”The result: A detailed description of the image in Russian
SECTION 4: VOICE MESSAGE PROCESSING 4.1 Audio transcription stream WhatsApp Business Cloud4 → HTTP Request2 → OpenAI2
WhatsApp Business Cloud4:
Media Get ID: = {{$ ('WhatsApp Trigger1') .item.json.messages [0] .audio.id}}HTTP Request2:
Downloads an audio file (OGG Opus format) OpenAI2:
Resource: audioOperation: transcribe (Whisper API)Binary Property Name: dataThe result: Text transcription of a voice message
SECTION 5: AI CONSULTANT 5.1 AI Agent1 — Principal Consultant Purpose: Chief AI consultant for communication with customers
Connected components:
OpenAI Chat Model1 (gpt-4o-mini) - main language modelSimple Memory1 - memory of the dialogue with the clientSupabase Vector Store1 - product databasePinecone Vector Store2 - store knowledge baseGetLead1 - lead notification toolSystem prompt):
You're a virtual consultant and salesman in an electronics store.
You are polite, competent, friendly and always strive to help customers choose the right product
You are connected to the Supabase database, which contains current product data:
name, category, specifications (including manufacturer, model, memory capacity, screen size, battery, connection type, etc.), price, availability, rating, product ID, link to photo.
Your task is:
Find out the customer's needs and offer suitable products.
Answer questions about the characteristics and differences between products
Report availability and price.
Offer related products or alternatives when you don't need them.
Always use information from the database (Supabase) — don't make anything up.
Examples of behavior:
If a user writes:
“I want a cheap smartphone with a good camera”
— Check your budget, ask what else is important (for example, brand or autonomy), and select 3 options from the database, briefly describing their advantages.
If it asks:
“How is this laptop different from that one?”
— Compare the characteristics from the database: screen, processor, memory, autonomy, etc.
If the item is out of stock:
— Report this and suggest similar alternatives.
Response format:
Short and clear (1-2 paragraphs).
Show price and availability.
Provide a link to a photo or product card, if it is available in the database.
Communication style:
Respectful but lively (like “you”, with a friendly tone).
Not intrusive, but with easy sales elements: emphasize benefits, offer better options.
If the customer reaches the purchase stage and chooses something for themselves, use the GetLead tool to send a lead alert.
If you see the phrase “In the picture” or “On the picture” in the message and then there is a description of a picture, then don't answer that you can't see the pictures, but just pretend that you saw and analyzed the content of the image without using the phrase “Your description” instead write “Your image...”.
IMPORTANT! Instead of saying “Your description..”, say “Your image...”.
5.2 Simple Memory1 - Dialogue memory Purpose: Keeps the context of the conversation with each client
Settings:
Session Key: = {{$ ('WhatsApp Trigger1') .item.json.contacts [0] .wa_id}}Context Window Length: 10 (last 10 posts)How it works: Each phone number = a unique session with a conversation history
SECTION 6: DATABASES 6.1 Supabase Vector Store1 - Product Database Purpose: The main database with the product catalog
Settings:
Mode: retrieve-as-toolTool Name: shop_storageTable Name: productsCredentials: Supabase account 5The structure of these goods:
Name, category, brand, model Technical specifications (processor, memory, screen) Price, availability, rating Product photos and descriptions 6.2 Pinecone Vector Store2 - Knowledgebase Purpose: Information about the store, delivery, guarantees
Settings:
Tool Name: InfoPinecone Index: Select the index you created on the Pinecone websiteCredentials: PineconeAPI account 2Content:
Delivery and payment Guarantee obligations Contacts and working hours Promotions and special offers SECTION 7: LEAD SYSTEM 7.1 GetLead1 — Telegram notifications Purpose: Automatically notifies managers about customers ready to buy
Settings:
Chat ID: 930460462 (Management Group)Credentials: Telegram APIWhen it works:
The customer chose the product Ready to buy Requests checkout Notification format:
🔥 NEW LEAD!
👤 Client: +79001234567
💬 Request: iPhone 15 Pro, ready to buy
💰 Amount: 120,000 rubles
⏰ Time: 14:30
SECTION 8: SENDING RESPONSES 8.1 WhatsApp Business Cloud6 - Send messages Purpose: Sends the AI consultant's answers to the client
Settings:
Operation: sendPhone Number ID: 642425372281416Recipient: = {{$ ('WhatsApp Trigger1') .item.json.contacts [0] .wa_id}}Text Body: = {{$json.output}}SECTION 9: MAILING SYSTEM 9.1 Mass mailings Schedule Trigger → Google Sheets → WhatsApp Business Cloud
Schedule Trigger:
Launches scheduled mailings Google Sheets:
Document ID: Select the table you need that contains a list of customer phone numbersWhatsApp Business Cloud:
Template: create and select an approved template in WhatsApp ManagerSends marketing messages SECTION 10: CONTENT MANAGEMENT 10.1 Uploading documents to the knowledge base Form Trigger → Document Loader → Text Splitter → Pinecone
On form submission1:
Web form for uploading documents (disabled) Default Data Loader1:
Character Text Splitter1:
Breaks documents into fragments Pinecone Vector Store3:
Saves to the knowledge base Node connection diagram Main stream: WhatsApp Trigger1 → Edit Fields → Switch1 Content processing: Switch1 (Image) → WhatsApp Business Cloud5 → HTTP Request3 → OpenAI3 → AI Agent1 Switch1 (Text) → AI Agent1 Switch1 (Voice) → WhatsApp Business Cloud4 → HTTP Request2 → OpenAI2 → AI Agent1 Final shipment: AI Agent1 → WhatsApp Business Cloud6 AI connections: OpenAI Chat Model1 → AI Agent1 Simple Memory1 → AI Agent1 Supabase Vector Store1 → AI Agent1 Pinecone Vector Store2 → AI Agent1 GetLead1 → AI Agent1 Required services and their settings Setting up WhatsApp Business: Create a WhatsApp business account Get Phone Number ID: 642425372281416 Настройте webhook для приема сообщений Подготовьте шаблоны для рассылок Настройка Supabase: Создайте проект в Supabase Настройте таблицу "products" с полями товаров Включите векторные расширения (pgvector) Получите API ключи Настройка Pinecone: Создайте индекс "ope" для базы знаний Настройте векторные размерности (1536 для OpenAI embeddings) Настройка Telegram: Создайте бота через @BotFather Создайте группу для уведомлений Получите Chat ID: 930460462 Возможности системы Поддерживаемые типы контента: Текстовые сообщения - прямая обработка AI AgentИзображения - анализ через GPT-4O VisionГолосовые сообщения - транскрипция через Whisper APIAI возможности: Консультация по товарам - поиск и рекомендации из базыСравнение товаров - детальное сравнение характеристикОбработка изображений - анализ фото товаров от клиентовГолосовое общение - поддержка голосовых запросовПамять диалога - персонализированное общениеДетекция готовности к покупке - автоматические уведомленияБизнес-функции: База товаров - актуальная информация о наличии и ценахБаза знаний - политики магазина, доставка, гарантииСистема лидов - автоматические уведомления менеджерамМассовые рассылки - маркетинговые кампанииАналитика диалогов - полная история общения с клиентамиПрименение системы Для интернет-магазинов: 24/7 консультации - клиенты получают помощь в любое времяПерсонализированные рекомендации - AI подбирает товары под запросыАвтоматическая квалификация лидов - горячие клиенты сразу попадают к менеджерамСнижение нагрузки на поддержку - AI решает 80% стандартных вопросовДля розничных сетей: Омниканальность - единая система обслуживанияМасштабирование - один бот может обслуживать тысячи клиентовСтандартизация сервиса - одинаковое качество обслуживанияИнтеграция с системами - подключение к CRM, складу, аналитикеДля малого бизнеса: Экономия на персонале - замена нескольких консультантовПрофессиональный сервис - уровень обслуживания как у крупных компанийПростота управления - минимальные технические требованияБыстрый запуск - готовое решение за несколько днейРезультат работы системы Что получается: Автоматизированные продажи работающие круглосуточноПерсонализированный AI консультант для каждого клиентаСистема квалификации лидов с мгновенными уведомлениямиОмниканальное обслуживание (текст, голос, изображения)Интеграция с бизнес-процессами через базы данныхМетрики эффективности: Время ответа - мгновенные ответы 24/7Конверсия в лиды - автоматическая детекция готовности к покупкеПерсонализация - память 10 последних сообщений каждого клиентаМасштабируемость - обслуживание неограниченного количества клиентовПреимущества перед живыми консультантами: Доступность - работает 24/7 без выходных и перерывовКонсистентность - одинаково высокое качество для всех клиентовSpeed - instant search for information in the product databaseObjectivity - recommendations are based only on product characteristicsmemento - remembers all previous conversations with the clientScalability - one bot = thousands of consultantsROI and economic indicators: Savings on wages - replacing 5-10 consultants with one botIncrease conversions - customers get help instantlyReduced lead processing time - hot clients get to managers right awayEnhancing customer experience - a modern convenient communication channelThis system turns WhatsApp into a powerful sales channel with an AI consultant who works more effectively than a team of live operators!