Log inStart Free Trial
Meta Tech Provider

Let ChatGPT answer your WhatsApp Business customers

OpenAI's models, the ones behind ChatGPT, can answer WhatsApp Business customers through the API: connect your number to Meta's Cloud API, save an OpenAI API key, and write instructions about your business. An AI-reply automation then sends incoming messages to the model and posts its answers from your number, billed by OpenAI to your own account, while you keep using the WhatsApp Business app.

easyCoexistence runs the automation that puts your OpenAI model on your WhatsApp Business number: your key, your model and your instructions, with the chat history, reply caps and the pause when you answer from the phone built in.

20,000

Characters allowed in the Instructions of a Reply with AI step.

10

Earlier messages of the chat the model reads by default, adjustable from 0 to 20.

600

Default Longest reply in tokens, adjustable from 50 to 2,000.

10 per hour

Default cap on AI replies per chat, adjustable from 1 to 60, so a loop between two bots stops at the cap.

Separate bill

OpenAI bills API usage on the API platform account, apart from any ChatGPT subscription.

429

OpenAI's error when an organization has no prepaid credits left; requests keep failing until credits are added.

How does an OpenAI model answer a WhatsApp customer?

Through an automation on your number, not through the ChatGPT app. When a customer writes, Meta delivers the message to easyCoexistence, the automation's Reply with AI step calls OpenAI's API with your key, sending your instructions and the latest messages of that chat, and the model's answer goes out from your WhatsApp Business number, usually within seconds. The reply appears in the chat thread on your phone like any message you send.

The ChatGPT app is optional here. You can build the automation by asking ChatGPT through the connector, or build it yourself in the editor; either way, ChatGPT does not need to be open for customers to get answers.

1Customer writesA message reaches your number
2Automation matchesAny message, a keyword, a first message or after hours
3OpenAI model repliesYour key, your instructions, the latest messages
4Sent from your numberShows in the app's chat thread

What does the model receive?

Three things, in this order. First, your Instructions, up to 20,000 characters, where {{first_name}}, {{name}}, {{message}} and {{phone}} are filled in before the call. Second, five lines easyCoexistence adds under them: reply as a short plain-text chat message in the customer's language, say a person from the business will answer soon when the customer asks for one or the model cannot help, never invent prices, stock, dates or policies missing from your instructions, and say it is the business's automated assistant when asked whether it is a person. The first AI reply to a customer after a day without one also opens by saying so, and a short "(Automated assistant)" label is added if the model leaves it out. Third, the conversation: the new message plus up to 20 earlier messages of that chat, 10 by default, set in Earlier messages it reads, including the replies you typed on the phone, for as long as the chat is kept: easyCoexistence keeps chat messages for the days you choose in Conversations, 30, 90 or 365, and 90 by default.

Text, button and list replies arrive as text. Media arrives as a placeholder, such as "[image]" with its caption, "[voice message]", "[sticker]", "[location]" with its name or "[contact card]", and a voice note is written out on your OpenAI key as "[voice message]" followed by what was said; one too long to write out, or sent while the key does not work, stays "[voice message]" alone.

How should you write the instructions?

Write what a new employee would need on day one: what you sell, prices, hours, delivery area, how an order is taken, and what goes to a person. The model is told not to invent facts, so a price missing from the instructions turns into "a person will answer soon" rather than a guess. Keep the tone line short and specific, and say how long replies should be: two or three sentences read well in a chat.

Instructions for a Reply with AI step (example)
You are the WhatsApp assistant of Ana's Bakery.
The customer's first name is {{first_name}}.

Facts:
- Open Monday to Saturday, 8:00 to 18:00. Closed on Sundays.
- We deliver within 5 km: $4, or no charge on orders above $30.
- Sourdough $6, croissant $3, birthday cakes from $35.
- Gluten-free loaf baked on Tuesdays and Fridays.
- Cakes need 48 hours' notice.

Rules:
- Answer in 1 to 3 short sentences, friendly, no lists.
- To take an order, ask for the item, quantity, day and address.
- Never confirm an order yourself: say Ana confirms it by message.
- Complaints, refunds and allergy questions: say a person will reply.

What limits keep it under control?

Guards built into the runner, so none of them depends on a setting you have to remember:

  • AI replies go out only within 24 hours of the customer's last message; later runs are skipped as window_closed, and only a template can reach that customer.
  • AI replies per chat per hour, at most: 10 by default, from 1 to 60. Past the cap, runs are skipped as ai_limit, so a loop between two bots stops there instead of running up your OpenAI bill.
  • Longest reply (tokens): 600 by default, from 50 to 2,000.
  • One automation per message: keyword automations first, then first message, then after hours, then the catch-all, oldest first within a kind.
  • Meta's retries of the same message are ignored, and reactions, delivery statuses and your own sends never start a reply.
  • Sends are paced at most 10 per second per number, under Meta's fixed 20 per second for Coexistence.

What happens when you answer a customer from your phone?

The AI steps back on that chat. A message you type in the WhatsApp Business app reaches easyCoexistence as an echo, and from then on runs on that chat are skipped for the hours set in Pause on a chat after I answer it, 4 by default and from 0 to 168, with "You answered this chat from your phone recently" in the run log. Other chats keep their AI replies. Answering from the Conversations screen in the dashboard pauses it the same way. Set it to 0 if the AI should keep answering after you step in.

Your replies are not lost on the model: they join the chat history it reads, as messages from the business, so when the pause ends it continues from where you left off. A Wait step behaves the same way: answer during the wait, and the remaining steps are skipped.

What does it cost on your OpenAI bill?

OpenAI charges your API account for the tokens of each reply, at the rates of the model you picked. Input tokens are your instructions, the four added lines, the earlier messages and the new message; output tokens are the reply, capped by Longest reply. The Runs tab shows both, tokens in and out, for every AI step, so the estimate is simple: average input tokens times the model's input price, plus average output tokens times its output price, times the replies you expect in a month.

OpenAI's quickstart asks you to add credits in the billing settings before real use; without them, requests fail with error 429. easyCoexistence never charges for AI and adds nothing for automations. Meta bills messages to your own WhatsApp Business Account, after a free tier of 1,000 service messages per number each month.

What happens if OpenAI refuses the key?

The automations that use OpenAI stop answering, and other automations on the number keep working. The list marks them "Paused: AI key refused", each one's page explains "Paused: your OpenAI key was refused. It starts again by itself once you save a key that works.", you receive one email, and a run already in progress is skipped as "Paused until the AI key works again". A refusal means OpenAI rejected the key itself, for example because it was revoked; saving a working key under AI keys brings the automations back.

Other failures, such as an empty credit balance or a model id OpenAI no longer serves, do not pause the automation: each affected run is marked Failed, the run log keeps the error, and you get an email so you can answer that customer yourself, at most one per automation every 6 hours.

How to set it up

  1. Connect your numberIn the easyCoexistence dashboard, click Connect a number and scan the QR code with the WhatsApp Business app. It usually takes under 2 minutes.
  2. Create an OpenAI API keyOn platform.openai.com/api-keys, create a secret key, and add credits in the billing settings so replies do not fail.
  3. Save it under AI keysOn the Automations page, open AI keys, click Add key next to OpenAI, paste the key and click Test and save. It is checked without spending tokens and then shows as Added, ending in its last four characters.
  4. Add a Reply with AI stepClick New automation, then Start from scratch, delete the empty Reply with text step and add a Reply with AI step with the + under Say something. Set Provider to OpenAI, pick a model from the list and write your Instructions. For a model that also uses your files and tools, pick the Agent answers everything example instead.
  5. Save it switched off, then testFlip the switch in the editor bar to Off and click Save. Press the Test button that appears, type a real question and click Run test: OpenAI really answers and the tokens show, but nothing is sent.
  6. Turn it onFlip the switch to On and click Save. The next message to the number gets an AI reply, and the Runs tab records it.

Common mistakes

  • Saving a key from an OpenAI organization with no credit. The key check lists models without spending tokens, so it can pass, but OpenAI then refuses the replies with error 429 until credit is added.
  • Leaving prices and hours out of the Instructions. The model is told never to invent prices, stock, dates or policies, so missing facts turn into "a person will answer soon".
  • Setting Earlier messages it reads to 0. The model then sees only the newest message and asks customers to repeat what they said a minute ago; keep the default of 10 for a conversation.
  • Assuming every voice note is understood. A long recording, or one sent while the OpenAI key is refused, stays "[voice message]" with no words, so tell the model what to do, such as asking the customer to type the question.
Doing this with EasyCoexistence

We never charge for AI or add a markup. US$ 9 down to US$ 0.75 per number per month, falling as you add numbers, with the first 3 days free.

easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.

Frequently asked questions

Can I use my ChatGPT Plus or Pro subscription instead of an API key?

No. AI replies call OpenAI's API, which needs an API key from platform.openai.com and is billed on that account, separately from any ChatGPT plan.

Which OpenAI model should I choose?

Pick from the list your key loads, which shows chat models only. Run the same test message on two models and compare the replies and the token counts in the test result before you save.

Will it answer in Portuguese or Spanish?

Yes. The added instructions tell the model to reply in the customer's language, so a message in Portuguese gets a Portuguese answer. To keep one language, say so in your Instructions.

Can ChatGPT set this up for me?

Yes, once your OpenAI key is saved in the dashboard. Ask ChatGPT, through the easyCoexistence connector, for an automation with a Reply with AI step, provider openai and your instructions; it calls create_automation, then test_automation.

Keep reading

Ready to get started?

Set up WhatsApp Coexistence in minutes, not months. The app keeps working on the phone.

Start Free Trial

Verified on