See llms.txt for all machine-readable content.

OpenAI and WhatsApp Business Cloud integration

Save yourself the work of writing custom integrations for OpenAI and WhatsApp Business Cloud and use n8n instead. Build adaptable and scalable AI, workflows that work with your technology stack. All within a building experience you will love.

How to connect OpenAI and WhatsApp Business Cloud

Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

OpenAI and WhatsApp Business Cloud integration: Create a new workflow and add the first step

AI-powered WhatsApp chatbot for text, voice, images, and PDF with RAG

Who is this for? This template is designed for internal support teams, product specialists, and knowledge managers in technology companies who want to automate ingestion of product documentation and enable AI-driven, retrieval-augmented question answering via WhatsApp. What problem is this workflow solving? Support agents often spend too much time manually searching through lengthy documentation, leading to inconsistent or delayed answers. This solution automates importing, chunking, and indexing product manuals, then uses retrieval-augmented generation (RAG) to answer user queries accurately and quickly with AI via WhatsApp messaging. What these workflows do Workflow 1: Document Ingestion & Indexing Manually triggered to import product documentation from Google Docs. Automatically splits large documents into chunks for efficient searching. Generates vector embeddings for each chunk using OpenAI embeddings. Inserts the embedded chunks and metadata into a MongoDB Atlas vector store, enabling fast semantic search. Workflow 2: AI-Powered Query & Response via WhatsApp Listens for incoming WhatsApp user messages, supporting various types: Text messages: Plain text queries from users. Audio messages: Voice notes transcribed into text for processing. Image messages: Photos or screenshots analyzed to provide contextual answers. Document messages: PDFs, spreadsheets, or other files parsed for relevant content. Converts incoming queries to vector embeddings and performs similarity search on the MongoDB vector store. Uses OpenAI’s GPT-4o-mini model with retrieval-augmented generation to produce concise, context-aware answers. Maintains conversation context across multiple turns using a memory buffer node. Routes different message types to appropriate processing nodes to maximize answer quality. Setup Setting up vector embeddings Authenticate Google Docs and connect your Google Docs URL containing the product documentation you want to index. Authenticate MongoDB Atlas and connect the collection where you want to store the vector embeddings. Create a search index on this collection to support vector similarity queries. Ensure the index name matches the one configured in n8n (data_index). See the example MongoDB search index template below for reference. Setting up chat Authenticate the WhatsApp node with your Meta account credentials to enable message receiving and sending. Connect the MongoDB collection containing embedded product documentation to the MongoDB Vector Search node used for similarity queries. Set up the system prompt in the Knowledge Base Agent node to reflect your company’s tone, answering style, and any business rules, ensuring it references the connected MongoDB collection for context retrieval. Make sure Both MongoDB nodes (in ingestion and chat workflows) are connected to the same collection with: An embedding field storing vector data, Relevant metadata fields (e.g., document ID, source), and The same vector index name configured (e.g., data_index). Search Index Example: { "mappings": { "dynamic": false, "fields": { "_id": { "type": "string" }, "text": { "type": "string" }, "embedding": { "type": "knnVector", "dimensions": 1536, "similarity": "cosine" }, "source": { "type": "string" }, "doc_id": { "type": "string" } } } }

Build your own OpenAI and WhatsApp Business Cloud integration

Create custom OpenAI and WhatsApp Business Cloud workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

OpenAI supported actions

WhatsApp Business Cloud supported actions

OpenAI and WhatsApp Business Cloud integration details

OpenAI

OpenAI

OpenAI, the creator of ChatGPT, offers a range of powerful models including GPT-3, DALL·E, and Whisper. Leverage these models to build AI-powered workflows.

WhatsApp Business Cloud

WhatsApp Business Cloud

The cloud-based version of WhatsApp Business API, WhatsApp Cloud API enables companies and developers to build applications on top of WhatsApp to personalize user experiences and quickly and easily respond to customers.

FAQ about OpenAI integrations

Need help setting up your OpenAI and WhatsApp Business Cloud integration?

Discover our latest community's recommendations and join the discussions about OpenAI and WhatsApp Business Cloud integration.

  • Artem

    How to define AI-powered Extra Workflow Inputs in AI tools?

    Artem

    Describe the question I need to pass to the tool some data from the AI Agent. Like, “task name” and “task tags” to create a task via Custom Workflow Tool. So I don’t know what to refer to in the Extra Inputs. Because th…

    Open topic
  • sérgio eduardo floresta filho

    The prompt is not being executed

    sérgio eduardo floresta filho

    Hello! My goal is to use Google Forms to collect information from my clients and then use n8n to automate the processing of this information. My workflow involves: Collecting data through Google Forms. Using n8n to re…

    Open topic
  • Heisenbug

    How to handle multi-message prompts in OpenAI Chat node?

    Heisenbug

    Describe the problem/error/question I want to send multiple messages to the OpenAI Chat node (LangChain → LLM Prompt Template) in a single execution, simulating a conversation. The first message is fixed, and the followi…

    Open topic
  • Julien

    OpenAI node - How to use the new Endpoint?

    Julien

    Is it possible to choose the Responses API or OpenAI ? It has been updated a few months ago by OpenAI, but the node still seems to be using the old Completions API. [https://platform.openai.com/docs/guides/migrate-to-re…

    Open topic
  • Andrew adawdad

    OpenAI not receicving JSON data from previous node

    Andrew adawdad

    Describe the problem/error/question Im currently using the openAI node to send a text message to the system. I am sending the previous nodes JSON data, but the openai response says that im only sending {{ $json }} instea…

    Open topic

Looking to integrate Slack and VirusTotal in your company?

Trusted by teams building smarter workflows

Why

Why use n8n to integrate OpenAI with WhatsApp Business Cloud

Handle branching, merging and iteration easily. Pause your workflow to wait for external events.

Re-run single steps to test changes in no time. And pin your data to avoid generating trigger events every time you execute.

Your data is displayed alongside your settings, making edge cases easy to track down.

Use 1000+ workflow templates available from our core team and our community.

Copy and paste, easily import and export workflows.

Simple enough to 
understand + sophisticated 
enough to ship