How to Connect WhatsApp to Gemini

6 min read Updated Sep 10, 2026 WhatsApp & SMS

Google's Gemini models can sit behind your WhatsApp Business number and answer customer questions around the clock. Connect WhatsApp Business to Social Intents, route it to a chat widget, select a Gemini model, add your Google AI API key, and train it on your business content.

Gemini is a bring your own key provider. You supply a Google AI API key and Google bills you directly for usage, which gives you full control over model choice and spend. If you would rather not manage a key, the ChatGPT guide covers models that are included in your plan.

What This Integration Does

Customers message your business number in WhatsApp. Gemini answers from the knowledge you have trained it on, and your team takes over in the Social Intents Inbox or in Microsoft Teams, Slack or Google Chat when a person is needed.

The chat widget is where your AI agent, your knowledge and your routing rules come together. WhatsApp is the customer's entry point, but the configuration lives on the widget, which is why the steps below start there.

Before You Start

  • A Social Intents plan that includes WhatsApp. WhatsApp is available on the Basic plan and above.
  • A chat widget for the team you want to connect. See Set Up Your First Chat Widget.
  • A Google AI API key. Gemini has no included models, so this step is required.
  • Access to the Meta Business account and WhatsApp Business Account you intend to authorize.
  • A business phone number you can verify through Meta's setup flow. It cannot be active on the consumer WhatsApp app unless you use coexistence mode.
  • Current FAQs, product documentation and policies for the assistant to learn from.
  • A destination for human replies: the Social Intents web Inbox or a connected team platform.

Connecting WhatsApp to Gemini

1. Get Your Google AI API Key

Create a key in Google AI Studio under your Google account and keep it somewhere safe. Usage on this key bills to you, not to Social Intents, so treat it like any other credential and rotate it if it is ever exposed.

2. Connect Your WhatsApp Business Number

Go to Integrations, choose WhatsApp, and start the connection. Meta's hosted signup takes over so you can select your Business account, choose or create a WhatsApp Business Account, and verify the phone number. Complete it exactly as prompted and return to Social Intents when it finishes.

3. Route the Number to a Chat Widget

Under Settings, then Channels, map the connected number to the chat widget that serves the team who should own these conversations. The AI agent and escalation rules are inherited from that widget. If you run several numbers, see Multiple WhatsApp Numbers.

4. Select a Gemini Model and Add Your Key

Open the widget, go to the AI Agent tab, and enable the AI chatbot. Choose a Gemini model and paste your Google AI API key into the provider configuration on the same tab.

Faster Flash models suit high volume support where most questions are short and factual. Pro models handle longer, multi-part questions better but cost more per message. Start with a Flash model and move up only if answer quality on real conversations warrants it.

5. Train It on Your Business

Add your website, help centre, PDFs and spreadsheets under the widget's knowledge settings. WhatsApp answers are read on a phone, so keep source material tight and current. See Training Your Chatbot on Content.

Then write your system instructions. Ask for short paragraphs, no markdown tables, and a clear next step in every reply. WhatsApp renders plain text, so formatting that looks fine in a web widget reads badly in a phone thread. See Writing System Instructions.

6. Set Up Human Handoff

Decide when Gemini should stop and a person should take over: low confidence, an explicit request for a human, billing and cancellation topics, or anything touching a complaint. Configure this under escalation and confirm the receiving channel is one your team actually watches. See Escalation to Human Agents.

7. Test the Whole Path

Message the business number from a real phone. Confirm the answer is accurate, confirm the escalation trigger fires, and confirm the handoff lands in the right Inbox or channel. Test the failure case too, by asking something the assistant has no source for, and check that it escalates instead of guessing.

WhatsApp Session Rules and Costs

WhatsApp is not a web chat widget, and two of Meta's rules shape how this works.

First, the customer service window. When a customer messages you, you have a 24 hour window to reply with normal messages. Outside that window you can only send an approved template. Your AI agent answers inside the window, so this rarely affects it, but it does affect follow-ups. See WhatsApp Templates, Media and Sessions.

Second, cost. Budget for three things with Gemini: your Social Intents plan, your Google AI usage billed by Google against your API key, and Meta's messaging charges. Meta prices the WhatsApp Business Platform per delivered message with category and region based rates, billed to your Meta account.

Troubleshooting

The number connected but no messages arrive. Check that the number is mapped to a widget under Settings, then Channels. An authorized number with no widget mapping has nowhere to deliver conversations.

Messages arrive but the AI never answers. Confirm the AI chatbot is enabled on that specific widget, and that a Gemini model is selected. Widget settings are per widget, so enabling it on one does not enable it on another.

Authentication or quota errors. Re-enter your Google AI API key on the AI Agent tab, then check the key is active and the project has quota and billing available in Google AI Studio. Because Gemini is bring your own key, an exhausted quota stops answers even though everything in Social Intents is configured correctly.

The AI answers, but badly. This is almost always knowledge rather than model. Check what sources are trained, look at the transcript to see what it drew from, and tighten your system instructions before moving to a larger model.

Handoffs go nowhere. Verify the escalation destination and that someone is actually monitoring it. See Troubleshooting Missed Chats.

Frequently Asked Questions

Do I need a Google AI API key to use Gemini?

Yes. Gemini is a bring your own key provider and has no included models. You create a key in Google AI Studio, paste it into the AI Agent tab, and Google bills you directly for usage. If you want an option with no key, use ChatGPT, where GPT-5 mini, GPT-5 nano and GPT-4o are included in your plan.

Which plan do I need for WhatsApp?

WhatsApp is available on the Basic plan and above. Basic includes one WhatsApp number, with more available on higher plans. See Plans, Billing and Upgrades.

How much does Gemini usage cost?

Google sets the rates and bills your API key directly, so the cost depends on the model you select and your message volume. Check current pricing in Google AI Studio. This is separate from your Social Intents plan and from Meta's WhatsApp messaging charges.

Can I keep using WhatsApp on my phone with the same number?

Not with a standard connection, where the number moves to the WhatsApp Business Platform. Coexistence mode is the exception. See WhatsApp Coexistence Mode.

Can a human take over mid conversation?

Yes. When escalation fires, or an agent opens the conversation, the AI steps back and your team replies from the Inbox or your connected team platform. The customer stays in the same WhatsApp thread throughout.

Can I use Gemini on WhatsApp and a different model on my website?

Yes. Model choice is per widget. Route WhatsApp to one widget running Gemini and keep another widget on a different model for your website.

Related Articles