Back to Catalog

AI-powered WhatsApp chatbot πŸ€–πŸ“² for text, voice, images & PDFs with memory 🧠

DavideDavide
124334 views
2/3/2026
Official Page

This workflow is a highly advanced multimodal AI assistant designed to operate through WhatsApp. It can understand and respond to text, images, voice messages, and PDF documents by combining OpenAI models with smart logic to adapt to the content received.


🎯 Core Features

πŸ“₯ 1. Automatic Message Type Detection

Using the Input type node, the bot detects whether the user has sent:

  • Text
  • Voice messages
  • Images
  • Files (PDF)
  • Other unsupported content

πŸ’¬ 2. Smart Text Message Handling

  • Text messages are processed by an OpenAI GPT-4o-mini agent with a customized system prompt.
  • Replies are concise, accurate, and formatted for mobile readability.

πŸ–ΌοΈ 3. Image Analysis & Description

  • Images are downloaded, converted to base64, and analyzed by an image-aware AI model.
  • The output is a rich, structured description, designed for visually impaired users or visual content interpretation.

πŸŽ™οΈ 4. Voice Message Transcription & Reply

  • Audio messages are downloaded and transcribed using OpenAI Whisper.
  • The transcribed text is analyzed and answered by the AI.
  • Optionally, the AI reply can be converted back to voice using OpenAI's text-to-speech, and sent as an audio message.

πŸ“„ 5. PDF Document Extraction & Summary

  • Only PDFs are allowed (filtered via MIME type).
  • The document’s content is extracted and combined with the user's message.
  • The AI then provides a relevant summary or answer.

🧠 6. Contextual Memory

  • Each user has a personalized session ID with a memory window of 10 interactions.
  • This ensures a more natural and contextual conversation flow.

How It Works

Thisworkflow is designed to handle incoming WhatsApp messages and process different types of inputs (text, audio, images, and PDF documents) using AI-powered analysis. Here’s how it functions:

  • Trigger: The workflow starts with the WhatsApp Trigger node, which listens for incoming messages (text, audio, images, or documents).
  • Input Routing: The Input type (Switch node) checks the message type and routes it to the appropriate processing branch:
    • Text: Directly forwards the message to the AI agent for response generation.
    • Audio: Downloads the audio file, transcribes it using OpenAI, and sends the transcription to the AI agent.
    • Image: Downloads the image, analyzes it with OpenAI’s GPT-4 model, and generates a detailed description.
    • PDF Document: Downloads the file, extracts text, and processes it with the AI agent.
    • Unsupported Formats: Sends an error message if the input is not supported.
  • AI Processing: The AI Agent1 node, powered by OpenAI, processes the input (text, transcribed audio, image description, or PDF content) and generates a response.
  • Response Handling:
    • For audio inputs, the AI’s response is converted back into speech (using OpenAI’s TTS) and sent as a voice message.
    • For other inputs, the response is sent as a text message via WhatsApp.
  • Memory: The Simple Memory node maintains conversation context for follow-up interactions.

Setup Steps

To deploy this workflow in n8n, follow these steps:

  1. Configure WhatsApp API Credentials:
    • Set up WhatsApp Business API credentials (Meta Developer Account).
    • Add the credentials in the WhatsApp Trigger, Get Image/Audio/File URL, and Send Message nodes.

Set Up OpenAI Integration:

  • Provide an OpenAI API key in the Analyze Image, Transcribe Audio, Generate Audio Response, and AI Agent1 nodes.

Adjust Input Handling (Optional):

  • Modify the Switch node ("Input type") to handle additional message types if needed.
  • Update the "Only PDF File" IF node to support other document formats.

Test & Deploy:

  • Activate the workflow and test with different message types (text, audio, image, PDF).
  • Ensure responses are correctly generated and sent back via WhatsApp.

Need help customizing?

Contact me for consulting and support or add me on Linkedin.

AI-Powered WhatsApp Chatbot for Text, Voice, Images, and PDFs with Memory

This n8n workflow creates a versatile AI chatbot that interacts with users on WhatsApp, capable of processing various input types including text, voice messages, images, and PDF documents. It leverages OpenAI's language models for intelligent responses and maintains conversational memory for a more natural interaction.

What it does

This workflow automates the following steps:

  1. Listens for WhatsApp Messages: Triggers upon receiving any message on a configured WhatsApp Business Cloud account.
  2. Initial Message Processing: Extracts relevant message details such as sender, message type, and content.
  3. Determines Message Type: Uses a Switch node to route the message based on its type (text, audio, image, document).
  4. Handles Text Messages:
    • Passes the text message to an AI Agent configured with an OpenAI Chat Model and Simple Memory.
    • The AI Agent processes the text, considering previous conversational context, and generates a response.
    • Sends the AI-generated text response back to the user via WhatsApp.
  5. Handles Audio Messages:
    • Downloads the audio file via an HTTP Request.
    • Transcribes the audio to text using OpenAI's Whisper model.
    • Passes the transcribed text to the AI Agent (OpenAI Chat Model with Simple Memory).
    • Sends the AI-generated text response back to the user via WhatsApp.
  6. Handles Image Messages:
    • Downloads the image file via an HTTP Request.
    • Uses OpenAI's Vision capabilities to describe the image.
    • Passes the image description to the AI Agent (OpenAI Chat Model with Simple Memory).
    • Sends the AI-generated text response back to the user via WhatsApp.
  7. Handles PDF Documents:
    • Downloads the PDF file via an HTTP Request.
    • Extracts text content from the PDF using the "Extract from File" node.
    • Passes the extracted text to the AI Agent (OpenAI Chat Model with Simple Memory).
    • Sends the AI-generated text response back to the user via WhatsApp.
  8. Maintains Conversational Memory: The "Simple Memory" node ensures that the AI Agent remembers previous turns in the conversation, allowing for more coherent and context-aware responses.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • WhatsApp Business Cloud Account: Configured with a phone number and a webhook pointing to your n8n instance's WhatsApp Trigger.
  • OpenAI API Key: For accessing OpenAI's Chat, Whisper (for audio transcription), and Vision (for image description) models.
  • n8n Langchain Nodes: Ensure you have the @n8n/n8n-nodes-langchain package installed in your n8n instance for the AI Agent, OpenAI Chat Model, and Simple Memory nodes.

Setup/Usage

  1. Import the workflow: Download the JSON provided and import it into your n8n instance.
  2. Configure WhatsApp Trigger:
    • Set up your WhatsApp Business Cloud account and obtain the necessary API credentials.
    • In the "WhatsApp Trigger" node, configure your WhatsApp Business Cloud credentials.
    • Activate the workflow to generate a webhook URL. You will need to configure this URL in your WhatsApp Business Account settings as the webhook endpoint for incoming messages.
  3. Configure OpenAI Credentials:
    • In the "OpenAI Chat Model" and "OpenAI" (for Whisper/Vision) nodes, select or create your OpenAI API credentials.
  4. Activate the workflow: Once all credentials are set and the WhatsApp webhook is configured, activate the workflow.

Your AI-powered WhatsApp chatbot is now ready to interact with users!

Related Templates

Automate Reddit brand monitoring & responses with GPT-4o-mini, Sheets & Slack

How it Works This workflow automates intelligent Reddit marketing by monitoring brand mentions, analyzing sentiment with AI, and engaging authentically with communities. Every 24 hours, the system searches Reddit for posts containing your configured brand keywords across all subreddits, finding up to 50 of the newest mentions to analyze. Each discovered post is sent to OpenAI's GPT-4o-mini model for comprehensive analysis. The AI evaluates sentiment (positive/neutral/negative), assigns an engagement score (0-100), determines relevance to your brand, and generates contextual, helpful responses that add genuine value to the conversation. It also classifies the response type (educational/supportive/promotional) and provides reasoning for whether engagement is appropriate. The workflow intelligently filters posts using a multi-criteria system: only posts that are relevant to your brand, score above 60 in engagement quality, and warrant a response type other than "pass" proceed to engagement. This prevents spam and ensures every interaction is meaningful. Selected posts are processed one at a time through a loop to respect Reddit's rate limits. For each worthy post, the AI-generated comment is posted, and complete interaction data is logged to Google Sheets including timestamp, post details, sentiment, engagement scores, and success status. This creates a permanent audit trail and analytics database. At the end of each run, the workflow aggregates all data into a comprehensive daily summary report with total posts analyzed, comments posted, engagement rate, sentiment breakdown, and the top 5 engagement opportunities ranked by score. This report is automatically sent to Slack with formatted metrics, giving your team instant visibility into your Reddit marketing performance. --- Who is this for? Brand managers and marketing teams needing automated social listening and engagement on Reddit Community managers responsible for authentic brand presence across multiple subreddits Startup founders and growth marketers who want to scale Reddit marketing without hiring a team PR and reputation teams monitoring brand sentiment and responding to discussions in real-time Product marketers seeking organic engagement opportunities in product-related communities Any business that wants to build authentic Reddit presence while avoiding spammy marketing tactics --- Setup Steps Setup time: Approx. 30-40 minutes (credential configuration, keyword setup, Google Sheets creation, Slack integration) Requirements: Reddit account with OAuth2 application credentials (create at reddit.com/prefs/apps) OpenAI API key with GPT-4o-mini access Google account with a new Google Sheet for tracking interactions Slack workspace with posting permissions to a marketing/monitoring channel Brand keywords and subreddit strategy prepared Create Reddit OAuth Application: Visit reddit.com/prefs/apps, create a "script" type app, and obtain your client ID and secret Configure Reddit Credentials in n8n: Add Reddit OAuth2 credentials with your app credentials and authorize access Set up OpenAI API: Obtain API key from platform.openai.com and configure in n8n OpenAI credentials Create Google Sheet: Set up a new sheet with columns: timestamp, postId, postTitle, subreddit, postUrl, sentiment, engagementScore, responseType, commentPosted, reasoning Configure these nodes: Brand Keywords Config: Edit the JavaScript code to include your brand name, product names, and relevant industry keywords Search Brand Mentions: Adjust the limit (default 50) and sort preference based on your needs AI Post Analysis: Customize the prompt to match your brand voice and engagement guidelines Filter Engagement-Worthy: Adjust the engagementScore threshold (default 60) based on your quality standards Loop Through Posts: Configure max iterations and batch size for rate limit compliance Log to Google Sheets: Replace YOURSHEETID with your actual Google Sheets document ID Send Slack Report: Replace YOURCHANNELID with your Slack channel ID Test the workflow: Run manually first to verify all connections work and adjust AI prompts Activate for daily runs: Once tested, activate the Schedule Trigger to run automatically every 24 hours --- Node Descriptions (10 words each) Daily Marketing Check - Schedule trigger runs workflow every 24 hours automatically daily Brand Keywords Config - JavaScript code node defining brand keywords to monitor Reddit Search Brand Mentions - Reddit node searches all subreddits for brand keyword mentions AI Post Analysis - OpenAI analyzes sentiment, relevance, generates contextual helpful comment responses Filter Engagement-Worthy - Conditional node filters only high-quality relevant posts worth engaging Loop Through Posts - Split in batches processes each post individually respecting limits Post Helpful Comment - Reddit node posts AI-generated comment to worthy Reddit discussions Log to Google Sheets - Appends all interaction data to spreadsheet for permanent tracking Generate Daily Summary - JavaScript aggregates metrics, sentiment breakdown, generates comprehensive daily report Send Slack Report - Posts formatted daily summary with metrics to team Slack channel

Daniel ShashkoBy Daniel Shashko
679

Track daily moods with AI analysis & reports using GPT-4o, Data Tables & Gmail

Track your daily mood in one tap and receive automated AI summaries of your emotional trends every week and month. Perfect for self-reflection, wellness tracking, or personal analytics. This workflow logs moods sent through a webhook (/mood) into Data Tables, analyzes them weekly and monthly with OpenAI (GPT-4o), and emails you clear summaries and actionable recommendations via Gmail. βš™οΈ How It Works Webhook – Mood β†’ Collects new entries (πŸ™‚, 😐, or 😩) plus an optional note. Set Mood Data β†’ Adds date, hour, and note fields automatically. Insert Mood Row β†’ Stores each record in a Data Table. Weekly Schedule (Sunday 20:00) β†’ Aggregates the last 7 days and sends a summarized report. Monthly Schedule (Day 1 at 08:00) β†’ Aggregates the last 30 days for a deeper AI analysis. OpenAI Analysis β†’ Generates insights, patterns, and 3 actionable recommendations. Gmail β†’ Sends the full report (chart + AI text) to your inbox. πŸ“Š Example Auto-Email Weekly Mood Summary (last 7 days) πŸ™‚ 5 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 😐 2 β–ˆβ–ˆβ–ˆβ–ˆ 😩 0 Average: 1.7 (Positive πŸ™‚) AI Insights: You’re trending upward this week β€” notes show that exercise days improved mood. Try keeping short walks mid-week to stabilize energy. 🧩 Requirements n8n Data Tables enabled OpenAI credential (GPT-4o or GPT-4 Turbo) Gmail OAuth2 credential to send summaries πŸ”§ Setup Instructions Connect your credentials: Add your own OpenAI and Gmail OAuth2 credentials. Set your Data Table ID: Open the Insert Mood Row node and enter your own Data Table ID. Without this, new moods won’t be stored. Replace the email placeholder: In the Gmail nodes, replace your.email@example.com with your actual address. Deploy and run: Send a test POST request to /mood (e.g. { "mood": "πŸ™‚", "note": "productive day" }) to log your first entry. ⚠️ Before activating the workflow, ensure you have configured the Data Table ID in the β€œInsert Mood Row” node. 🧠 AI Analysis Interprets mood patterns using GPT-4o. Highlights trends, potential triggers, and suggests 3 specific actions. Runs automatically every week and month. πŸ”’ Security No personal data is exposed outside your n8n instance. Always remove or anonymize credential references before sharing publicly. πŸ’‘ Ideal For Personal mood journaling and AI feedback Therapists tracking client progress Productivity or self-quantification projects πŸ—’οΈ Sticky Notes Guide 🟑 Mood Logging Webhook POST /mood receives mood + optional note. ⚠️ Configure your own Data Table ID in the β€œInsert Mood Row” node before running. 🟒 Weekly Summary Runs every Sunday 20:00 β†’ aggregates last 7 days β†’ generates AI insights + emails report. πŸ”΅ Monthly Summary Runs on Day 1 at 08:00 β†’ aggregates last 30 days β†’ creates monthly reflection. 🟣 AI Analysis Uses OpenAI GPT-4o to interpret trends and recommend actions. 🟠 Email Delivery Sends formatted summaries to your inbox automatically.

Jose CastilloBy Jose Castillo
105

IT ops AI SlackBot workflow - chat with your knowledge base

Video Demo: Click here to see a video of this workflow in action. Summary Description: The "IT Department Q&A Workflow" is designed to streamline and automate the process of handling IT-related inquiries from employees through Slack. When an employee sends a direct message (DM) to the IT department's Slack channel, the workflow is triggered. The initial step involves the "Receive DMs" node, which listens for new messages. Upon receiving a message, the workflow verifies the webhook by responding to Slack's challenge request, ensuring that the communication channel is active and secure. Once the webhook is verified, the workflow checks if the message sender is a bot using the "Check if Bot" node. If the sender is identified as a bot, the workflow terminates the process to avoid unnecessary actions. If the sender is a human, the workflow sends an acknowledgment message back to the user, confirming that their query is being processed. This is achieved through the "Send Initial Message" node, which posts a simple message like "On it!" to the user's Slack channel. The core functionality of the workflow is powered by the "AI Agent" node, which utilizes the OpenAI GPT-4 model to interpret and respond to the user's query. This AI-driven node processes the text of the received message, generating an appropriate response based on the context and information available. To maintain conversation context, the "Window Buffer Memory" node stores the last five messages from each user, ensuring that the AI agent can provide coherent and contextually relevant answers. Additionally, the workflow includes a custom Knowledge Base (KB) tool (see that tool template here) that integrates with the AI agent, allowing it to search the company's internal KB for relevant information. After generating the response, the workflow cleans up the initial acknowledgment message using the "Delete Initial Message" node to keep the conversation thread clean. Finally, the generated response is sent back to the user via the "Send Message" node, providing them with the information or assistance they requested. This workflow effectively automates the IT support process, reducing response times and improving efficiency. To quickly deploy the Knowledge Ninja app in Slack, use the app manifest below and don't forget to replace the two sample urls: { "display_information": { "name": "Knowledge Ninja", "description": "IT Department Q&A Workflow", "background_color": "005e5e" }, "features": { "bot_user": { "display_name": "IT Ops AI SlackBot Workflow", "always_online": true } }, "oauth_config": { "redirect_urls": [ "Replace everything inside the double quotes with your slack redirect oauth url, for example: https://n8n.domain.com/rest/oauth2-credential/callback" ], "scopes": { "user": [ "search:read" ], "bot": [ "chat:write", "chat:write.customize", "groups:history", "groups:read", "groups:write", "groups:write.invites", "groups:write.topic", "im:history", "im:read", "im:write", "mpim:history", "mpim:read", "mpim:write", "mpim:write.topic", "usergroups:read", "usergroups:write", "users:write", "channels:history" ] } }, "settings": { "event_subscriptions": { "request_url": "Replace everything inside the double quotes with your workflow webhook url, for example: https://n8n.domain.com/webhook/99db3e73-57d8-4107-ab02-5b7e713894ad", "bot_events": [ "message.im" ] }, "orgdeployenabled": false, "socketmodeenabled": false, "tokenrotationenabled": false } }

Angel MenendezBy Angel Menendez
39013