Create a WhatsApp chatbot with GPT-4o, Whisper transcription and Redis buffer
👥 Who's it for This workflow is perfect for businesses or individuals who want to automate WhatsApp conversations 💬 with an intelligent AI chatbot that can handle text, voice notes 🎵, and images 🖼️. No advanced coding required! 🤖 What it does It automatically receives WhatsApp messages through WasenderAPI, intelligently buffers consecutive messages to avoid fragmented responses, processes multimedia content (transcribing audio and analyzing images with AI), and responds naturally using GPT-4o mini with conversation memory. All while protecting your WhatsApp account from being banned. ⚙️ How it works
📱 Webhook Trigger – Receives new messages from WasenderAPI 🗃️ Redis Buffer System – Groups consecutive messages intelligently (7-second window) 🔀 Content Classifier – Routes messages by type (text, audio, or image) 🎵 Audio Processing – Decrypts and transcribes voice notes using OpenAI Whisper 🖼️ Image Analysis – Decrypts and analyzes images with GPT-4O Vision 🧠 AI Agent (GPT-4o mini) – Generates intelligent responses with 10-message memory ⏱️ Anti-Ban Wait – 6-second delay to simulate human typing 📤 Message Sender – Delivers response back to WhatsApp user
📋 Requirements
WasenderAPI account with connected WhatsApp number : https://wasenderapi.com/
Redis database (free tier works fine) OpenAI API key with access to GPT-4o mini and Whisper n8n's AI Agent, LangChain, and Redis nodes
🛠️ How to set up
Create your WasenderAPI account and connect a WhatsApp number Set up a free Redis database and get connection credentials Configure OpenAI API key in n8n credentials Replace the WasenderAPI Bearer token in "Get the audio", "Get the photo", and "Send Message to User" nodes Change the Manual Trigger to a Webhook and configure it in WasenderAPI Customize the AI Agent prompt to match your business needs Adjust wait times if needed (default: 6 seconds for responses, 7 seconds for buffer) Save and activate the workflow ✅
🎨 How to customize
Modify the AI Agent prompt to change bot personality and instructions Adjust buffer wait time (7 seconds) for faster/slower message grouping Change response delay (6 seconds) based on your use case , its recomendable 30 seconds. Add more content types (documents, videos) by extending the Switch Type node Configure conversation memory window (default: 10 messages)
n8n Workflow: WhatsApp Chatbot with GPT-4o, Whisper, and Redis Buffer
This n8n workflow creates a sophisticated WhatsApp chatbot that leverages OpenAI's GPT-4o for conversational AI, Whisper for transcribing voice messages, and Redis for buffering chat history. It enables a dynamic and intelligent conversational experience directly within WhatsApp.
What it does
This workflow automates the following steps to power a WhatsApp chatbot:
- Receives Incoming WhatsApp Messages: It listens for new messages sent to your configured WhatsApp number.
- Transcribes Voice Messages (Whisper): If an incoming message is an audio file, it uses OpenAI's Whisper model to transcribe the audio into text.
- Retrieves Chat History (Redis): It fetches the previous conversation history for the specific WhatsApp user from a Redis database.
- Constructs AI Agent Input: It combines the current message (text or transcribed audio) with the retrieved chat history to form a comprehensive input for the AI agent.
- Processes with GPT-4o AI Agent: It uses an OpenAI GPT-4o powered AI Agent (Langchain) to generate a response based on the current message and conversation history.
- Stores New Chat History (Redis): It updates the Redis database with the latest conversation exchange (user message + AI response) to maintain context for future interactions.
- Sends WhatsApp Response: It sends the AI-generated text response back to the user via WhatsApp.
- Handles Long Conversations: If the conversation history in Redis exceeds a certain length, it aggregates and truncates it to prevent excessive token usage and maintain performance.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- WhatsApp Business API / Provider: A WhatsApp integration configured in n8n (e.g., through a webhook trigger and HTTP Request node for sending messages). Note: The provided JSON does not include the WhatsApp trigger or send message nodes, implying these are external or custom configured.
- OpenAI API Key: An API key for OpenAI to access GPT-4o (chat model) and Whisper (audio transcription).
- Redis Instance: Access to a Redis database for storing and retrieving chat history.
- n8n Langchain Nodes: Ensure the
@n8n/n8n-nodes-langchainpackage is installed in your n8n instance.
Setup/Usage
- Import the Workflow: Import the provided JSON into your n8n instance.
- Configure Credentials:
- OpenAI: Set up your OpenAI API credentials for the "OpenAI Chat Model" and "OpenAI" nodes.
- Redis: Configure your Redis credentials for the "Redis" node.
- Configure WhatsApp Integration:
- Webhook Trigger: Set up a Webhook trigger (not included in this JSON) to receive incoming WhatsApp messages. This trigger should pass the message content (text or audio URL) and sender information.
- HTTP Request (Send WhatsApp Message): Configure the "HTTP Request" node (Node ID 19) to send messages back to WhatsApp. This will require your WhatsApp API endpoint and authentication.
- Customize AI Agent:
- AI Agent (Node ID 1119): Review and adjust the AI Agent's configuration, including its system message or specific tools, if needed, to tailor its behavior.
- Simple Memory (Node ID 1163): The memory buffer window can be adjusted if you need to retain more or less conversation history.
- Activate the Workflow: Once all configurations are complete, activate the workflow.
This setup will allow your WhatsApp chatbot to engage in intelligent, context-aware conversations, including understanding voice messages.
Related Templates
Competitor intelligence agent: SERP monitoring + summary with Thordata + OpenAI
Who this is for? This workflow is designed for: Marketing analysts, SEO specialists, and content strategists who want automated intelligence on their online competitors. Growth teams that need quick insights from SERP (Search Engine Results Pages) without manual data scraping. Agencies managing multiple clients’ SEO presence and tracking competitive positioning in real-time. What problem is this workflow solving? Manual competitor research is time-consuming, fragmented, and often lacks actionable insights. This workflow automates the entire process by: Fetching SERP results from multiple search engines (Google, Bing, Yandex, DuckDuckGo) using Thordata’s Scraper API. Using OpenAI GPT-4.1-mini to analyze, summarize, and extract keyword opportunities, topic clusters, and competitor weaknesses. Producing structured, JSON-based insights ready for dashboards or reports. Essentially, it transforms raw SERP data into strategic marketing intelligence — saving hours of research time. What this workflow does Here’s a step-by-step overview of how the workflow operates: Step 1: Manual Trigger Initiates the process on demand when you click “Execute Workflow.” Step 2: Set the Input Query The “Set Input Fields” node defines your search query, such as: > “Top SEO strategies for e-commerce in 2025” Step 3: Multi-Engine SERP Fetching Four HTTP request tools send the query to Thordata Scraper API to retrieve results from: Google Bing Yandex DuckDuckGo Each uses Bearer Authentication configured via “Thordata SERP Bearer Auth Account.” Step 4: AI Agent Processing The LangChain AI Agent orchestrates the data flow, combining inputs and preparing them for structured analysis. Step 5: SEO Analysis The SEO Analyst node (powered by GPT-4.1-mini) parses SERP results into a structured schema, extracting: Competitor domains Page titles & content types Ranking positions Keyword overlaps Traffic share estimations Strengths and weaknesses Step 6: Summarization The Summarize the content node distills complex data into a concise executive summary using GPT-4.1-mini. Step 7: Keyword & Topic Extraction The Keyword and Topic Analysis node extracts: Primary and secondary keywords Topic clusters and content gaps SEO strength scores Competitor insights Step 8: Output Formatting The Structured Output Parser ensures results are clean, validated JSON objects for further integration (e.g., Google Sheets, Notion, or dashboards). Setup Prerequisites n8n Cloud or Self-Hosted instance Thordata Scraper API Key (for SERP data retrieval) OpenAI API Key (for GPT-based reasoning) Setup Steps Add Credentials Go to Credentials → Add New → HTTP Bearer Auth* → Paste your Thordata API token. Add OpenAI API Credentials* for the GPT model. Import the Workflow Copy the provided JSON or upload it into your n8n instance. Set Input In the “Set the Input Fields” node, replace the example query with your desired topic, e.g.: “Google Search for Top SEO strategies for e-commerce in 2025” Execute Click “Execute Workflow” to run the analysis. How to customize this workflow to your needs Modify Search Query Change the search_query variable in the Set Node to any target keyword or topic. Change AI Model In the OpenAI Chat Model nodes, you can switch from gpt-4.1-mini to another model for better quality or lower cost. Extend Analysis Edit the JSON schema in the “Information Extractor” nodes to include: Sentiment analysis of top pages SERP volatility metrics Content freshness indicators Export Results Connect the output to: Google Sheets / Airtable for analytics Notion / Slack for team reporting Webhook / Database for automated storage Summary This workflow creates an AI-powered Competitor Intelligence System inside n8n by blending: Real-time SERP scraping (Thordata) Automated AI reasoning (OpenAI GPT-4.1-mini) Structured data extraction (LangChain Information Extractors)
Translate documents to multiple languages with Google Drive and DeepL
Who's it for This workflow is perfect for content creators, international teams, and businesses that need to translate documents into multiple languages automatically. Whether you're localizing documentation, translating marketing materials, or creating multilingual content, this workflow saves hours of manual work. What it does Automatically monitors a Google Drive folder for new documents (PDF, DOCX, TXT, or Markdown) and translates them into multiple languages using DeepL API. Each translated document is saved with a language-specific filename (e.g., documenten.pdf, documentzh.pdf) in a designated folder. You receive an email notification when all translations are complete. How it works Monitors a Google Drive folder for new files Detects file format (PDF/DOCX/TXT/Markdown) and extracts text Translates the content into your chosen languages (default: English, Chinese, Korean, Spanish, French, German) Saves translated files with language codes in the filename Sends an email notification with translation summary Optional: Records translation history in Notion database Set up instructions Requirements Google Drive account (for file storage) DeepL API key (free tier: 500,000 characters/month) Gmail account (for notifications) Notion account (optional, for tracking translation history) Setup steps Create Google Drive folders: Create a "Source" folder for original files Create a "Translated" folder for output Copy the folder IDs from the URLs Get DeepL API key: Sign up at DeepL API Copy your API key Configure the workflow: Open the "Configuration (Edit Here)" node (yellow node) Replace folder IDs with your own Set your notification email Choose target languages Set up credentials: Add Google Drive OAuth2 credentials Add DeepL API credentials Add Gmail OAuth2 credentials Activate the workflow and upload a test file! Customization options Change target languages: Edit the targetLanguages array in the Configuration node (supports 30+ languages) Adjust polling frequency: Change trigger from "every minute" to hourly or daily for batch processing Enable Notion tracking: Set enableNotion to true and provide your database ID Add more file formats: Extend the Switch node to handle additional file types Filter by file size: Add conditions to skip files larger than a certain size Supported languages EN (English), ZH (Chinese), KO (Korean), JA (Japanese), ES (Spanish), FR (French), DE (German), IT (Italian), PT (Portuguese), RU (Russian), and 20+ more. Performance Short files (1 page): ~30 seconds for 6 languages Medium files (10 pages): ~2 minutes for 6 languages Large files (100 pages): ~15 minutes for 6 languages Technical Details Trigger: Google Drive folder monitoring (1-minute polling) Translation: DeepL API with automatic source language detection Loop implementation: Split Out + Aggregate pattern for parallel translation Error handling: Catches API failures and sends email alerts Storage: Original file format preserved in translated outputs Notes DeepL free tier provides 500,000 characters/month (approximately 250 pages) For high-volume translation, consider upgrading to DeepL Pro The workflow creates new files instead of overwriting, preserving translation history Google Docs are automatically converted to the appropriate format before translation What You'll Learn This workflow demonstrates several n8n patterns: File format detection and routing (Switch node) Loop implementation with Split Out + Aggregate Binary data handling for file operations Conditional logic with IF nodes (optional features) Cross-node data references Error handling and user notifications Perfect for learning automation best practices while solving a real business problem!
Client review collection & sentiment analysis with HighLevel, GPT-4o, Gmail & Slack
📘 Description: This automation streamlines client review collection and sentiment summarization for Techdome using HighLevel CRM, Azure OpenAI GPT-4o, Gmail, Slack, and Google Sheets. It starts by pulling recently won deals from HighLevel, then generates and sends AI-written HTML review request emails with built-in Google Review and feedback form links. After waiting 24 hours, it fetches the client’s reply thread, summarizes the sentiment using GPT-4o, and posts a clean update to Slack for team visibility. Any failures—API errors, empty responses, or data validation issues—are logged automatically to Google Sheets for full transparency and QA. The result: a fully hands-free Client Appreciation + Feedback Intelligence Loop, improving brand perception and internal responsiveness. ⚙️ What This Workflow Does (Step-by-Step) ▶️ When Clicking ‘Execute Workflow’ (Manual Trigger) Allows on-demand execution or scheduled testing of the workflow. Initiates the fetch for all newly “Won” deals from HighLevel CRM. 🏆 Fetch All Won Deals from HighLevel Retrieves all opportunities labeled “won” in HighLevel, gathering essential client details such as name, email, and deal information to personalize outgoing emails. 🔍 Validate Deal Fetch Success (IF Node) Checks each record for a valid id field. ✅ True Path: Moves ahead to generate AI email content. ❌ False Path: Logs the event to Google Sheets under the error log sheet. 🧠 Configure GPT-4o Model (Azure OpenAI) Initializes the GPT-4o engine that powers all language-generation tasks in this workflow—ensuring precise tone, correct formatting, and safe structured HTML output. 💌 Generate Personalized Review Request Email (AI Agent) Uses GPT-4o to create a tailored, HTML-formatted email thanking the client for their business and requesting feedback. Includes two clickable CTA buttons: ⭐ Google Review Link: 📝 Internal Feedback Form: Google Form link for in-depth feedback Each email maintains Techdome’s friendly, brand-consistent voice with clean inline CSS styling. 📨 Send Review Request Email to Client (Gmail Node) Automatically sends the AI-generated email to the client’s registered address through Gmail. Ensures timely post-service communication without manual follow-ups. ⏳ Wait for 24 Hours Before Next Action Pauses the workflow for 24 hours to give clients time to read and respond to the review request. 📥 Retrieve Email Thread for Response (Gmail Node) After the waiting period, fetches the Gmail thread associated with the initial email to capture client replies or feedback messages. 🧠 Configure GPT-4o Model (Summarization Engine) Prepares another GPT-4o instance specialized for summarizing client replies into concise, sentiment-aware Slack messages. 💬 Summarize Client Feedback (AI Agent) Analyzes the Gmail thread and produces a short Slack-formatted summary using this structure: 🎉 New Client Review Received!Client: <Name> Feedback: <Message snippet> Sentiment: Positive / Neutral / Negative Focuses on tone clarity and quick readability for internal teams. 📢 Announce Review Summary in Slack Posts the AI-generated summary in a designated Slack channel, keeping success and support teams instantly informed of client sentiments and feedback trends. 📊 Log Errors in Google Sheets Appends all failures—including fetch issues, missing fields, or parsing errors—to the Google Sheets “error log sheet,” maintaining workflow reliability and accountability. 🧩 Prerequisites HighLevel CRM OAuth credentials (to fetch deals) Azure OpenAI GPT-4o access (for AI-driven writing and summarization) Gmail API connection (for sending & reading threads) Slack API integration (for posting summaries) Google Sheets access (for error logging) 💡 Key Benefits ✅ Automates personalized review outreach after project completion ✅ Waits intelligently before analyzing responses ✅ Uses GPT-4o to summarize client sentiment in human tone ✅ Sends instant Slack updates for real-time visibility ✅ Keeps audit logs of all errors for debugging 👥 Perfect For Client Success and Account Management Teams Agencies using HighLevel CRM for project delivery Teams aiming to collect consistent client feedback and reviews Businesses wanting AI-assisted sentiment insights in Slack