START HERE
Before you start
For business owners who want to answer recurring questions and already use Claude Code. You do not need to write a bot from scratch.
Claude Code
Installed and signed in. This is the tool that builds the bot with you.
Node.js
The runtime that runs the bot. The kit requires 20.12 or later; choose a supported LTS version for a new install.
HookMyApp
An account for the WhatsApp connection. Start in its test environment, called a sandbox.
Claude API
A separate API key and billing account. Your Claude Code subscription does not pay for the bot’s API calls.
My HookMyApp link is an affiliate link. Check the benefit and final price on the signup page before purchasing.
Which number should you connect?
Sandbox
A HookMyApp test number linked to your own phone. Learn without touching your business number.
WhatsApp Business
Check eligibility for connecting alongside the mobile app, called coexistence. Available history and features depend on onboarding.
Pause before migrating
Do not delete an account to follow this guide. Migration can affect chat history. Stay in the sandbox while checking the right migration path.
Download the starter kit
Open a terminal, the window where you run commands, and paste these three lines. They open the project folder and start Claude Code inside it.
git clone https://github.com/dangogit/whatsapp-business-bot-kit.git
cd whatsapp-business-bot-kit
claudeThe kit contains a small server, tests and a sample Pilates studio business file. AGENTS.md tells your coding agent how to set up the bot and what to check.
Claude Code is open in whatsapp-business-bot-kit and can read AGENTS.md.
Get the first reply on your phone
Paste the prompt into Claude Code. It installs the connection tool, opens browser sign-in and tells you which code to send from your phone.
Set up this bot in the HookMyApp sandbox using AGENTS.md. Install the CLI, sign me in and tell me exactly what to send from my phone. Prepare the Claude API key variable in .env and tell me how to enter it locally without printing it or asking me to paste it into chat. Preserve existing environment variables.You must press Send in WhatsApp after opening the join link; opening the chat alone does not join the sandbox. The bot and the sandbox connection run in two terminal windows. Keep both open while testing. Enter your key in the local file the agent prepares, never in the conversation or on GitHub.
A message from your phone gets a reply about the sample Pilates studio. Keep the real number disconnected.
Teach the bot about your business
The information starts in one file: business.md. Ask Claude Code to interview you, one question at a time, instead of filling in a template alone.
Interview me about my business, one question at a time, and fill in business.md. Do not invent anything: leave out information I have not supplied. Include common questions, prices, hours, tone and when to hand off to a person. Show me the final file for approval.Add your name, location, hours, services, exact prices, common questions and booking and cancellation rules. Include when to hand off and how the business should sound. Leave out information you have not supplied.
Do not leave this part for later
## When to hand off to a person
- Booking or changing a class
- Any payment or refund question
- Injuries, pregnancy or medical conditions
- Any complaint or request to speak to the team
## Tone
Warm, short and conversationalAsk five real customer questions. Correct wrong answers in the file and restart. Ask something the file does not cover and check that the bot does not invent an answer.
Hand off when a person is needed
Refunds, complaints, medical questions or a request for a human. The bot must stop, notify your team and leave room for you to answer.
Set OWNER_PHONE to my number and test the human handoff with me. Verify the phone format, an open service window, receipt of the owner alert and paused bot replies for that customer. If the notification fails, report it instead of marking the test successful.The kit pauses replies to that customer for 12 hours by default after a handoff. Owner alerts depend on the service window: send a message from a separate owner phone to the business number within the previous 24 hours. Check actual alert delivery, not just the promise to the customer.
Send a test refund request. The customer gets a handoff message, you receive an alert, and a follow-up customer message does not trigger another bot reply.
Connect your business number
Do this only after answers and handoffs work. The official onboarding opens in your browser through HookMyApp and Meta.
Connect the business WhatsApp number through HookMyApp using the current instructions. Before any step that affects the real number, stop and explain the change. Check coexistence support and the impact on the mobile app and chat history. Do not delete an account or migrate a number without my explicit approval. Preserve existing environment variables.Have access to the business account and the phone for verification. If you use the WhatsApp Business app, check coexistence support. Also test what happens when your team replies from the app. Approval times and verification methods can change.
The correct number appears as an active connection, a test message reaches the bot, and the team can take over.
Move to the cloud so your laptop can close
A bot running on your laptop stops when it closes. A cloud server runs the same code independently. The presentation uses Railway.
Prepare a Railway deployment following AGENTS.md. Before creating a paid service, show me the plan and cost and get my approval. Then deploy the code, transfer .env variables without printing them, add persistent storage for history and handoff pauses and verify they survive a restart and connect the new URL in HookMyApp. Check /health and then test a phone message with the local bot stopped.Deploy the code, store keys in server environment variables and update the message delivery address in HookMyApp. The current kit stores conversation history and handoff pauses in memory; a restart clears them. Before ongoing customer use, ask for persistent storage and verify that a paused customer stays paused after a restart.
/health returns ok. After stopping the local processes, a phone message still gets a reply. Test a human handoff again too.
Keep the bot focused on the business
Business-specific replies
Restrict the bot to your business services and information. Do not turn it into a general-purpose AI assistant.
A clear path to a person
Give customers a clear way to reach your team and test it. A request for a human should not end up in a bot loop.
The 24-hour window
Free-form replies belong within the service window opened by the customer’s message. Outside it, use an approved template and follow Meta’s consent rules.
This setup uses the official API. Meta policies, limits and enforcement still apply. An official connection does not guarantee a number will never be restricted.
What happens between the message and the reply?
- 1Customer sends
- 2Meta receives
- 3HookMyApp forwards
- 4Your server checks
- 5Claude writes
The server reads business.md and sends context to the model. The reply travels back through the WhatsApp connection. Claude Code builds the system; the Claude API powers its replies.
What does it actually cost?
Budget for four parts, including hosting. Plans change: check current pricing and your account’s billing before connecting a real number.
Meta
Meta documents 1,000 free delivered service messages per business number each month from October 2026. Further messages are charged and will not be delivered without a payment method. Rates depend on country and message category.
Meta pricing ↗HookMyApp
Plans start at $1, $24 or $97 per month, depending on the action allowance. Incoming messages do not count. Meta and Claude charges are separate.
HookMyApp plans ↗Claude API
Usage billing based on the model and input and output text. Monitor usage in your API account.
Claude pricing ↗Railway
Hosting that runs while your laptop is closed. Hobby starts at $5 per month with $5 of included usage; additional usage costs extra.
Railway pricing ↗Something not working?
The bot never receives my message
Check that both processes are running and the listener includes --path /webhook/whatsapp. Ask Claude Code to inspect logs without exposing keys.
I see Session expired
Run hookmyapp login again and reconnect the sandbox.
My Claude key disappeared after setup
Writing with sandbox env --write can replace the environment file. Restore the missing variable from a safe source without printing .env.
The bot stopped replying after working
Inspect logs first: a stopped server, expired connection, provider quota or billing issue. Identify which provider stopped the request before adding a payment method.
The customer sees a handoff but the owner gets no alert
Verify OWNER_PHONE and that the owner phone messaged the business number in the previous 24 hours. Repeat the test and verify actual delivery.
First, one good answer. Then, a real number.
Open the kit, connect the sandbox and send a question from your phone. Follow the steps until the bot knows your business and knows when to stop answering.
Presentation and sources
Based on the “WhatsApp on autopilot” presentation. Service details and limits checked on November 17, 2026. The provider’s current account pricing and eligibility apply.
- Open the original presentation
- Bot kit: AGENTS.md
- HookMyApp CLI
- WhatsApp Business Messaging Policy
- Meta: WhatsApp Business coexistence