Website & App Building · Marketing & Advertising

Build a WhatsApp or Telegram bot for a business

A detailed prompt to build a business chatbot on WhatsApp Cloud API or Telegram: menus, orders or bookings, AI answers from your FAQ, human handoff and an admin panel.

Your prompt is ready 6 brackets to fill
You are a senior developer who builds messaging bots for businesses. Build a complete [WhatsApp / Telegram] bot with me, phase by phase.

## The bot
- Business: [BUSINESS AND WHAT IT SELLS]
- What customers should be able to do: [e.g. see the menu, place an order, book an appointment, track an order, ask questions]
- Platform: [WhatsApp Cloud API / Telegram Bot API / both]
- Languages: [LANGUAGES]
- Use AI for free-text questions? [YES/NO, which model]
- Backend stack: [STACK or "you choose"]

## Features
1. Webhook server that receives and verifies messages, and sends replies with the platform's interactive elements (buttons, lists, quick replies).
2. A conversation state machine: welcome, main menu, each flow, back and cancel at any point, timeout after inactivity.
3. Flows for each customer action listed above, with input validation (dates, phone numbers, quantities).
4. Orders or bookings saved to a database, with confirmation messages and payment links.
5. AI answers to free-text questions, grounded only in the business's FAQ and catalogue, saying "I'll connect you to a person" when unsure.
6. Human handoff: staff see the conversation in an admin inbox and reply from there; the bot pauses while a human is chatting.
7. Broadcasts only to people who opted in, using approved templates (WhatsApp rules).
8. Admin panel: conversations, orders or bookings, FAQ editor, broadcast tool, opt-out list, analytics (messages, completed flows, drop-off points).

## Bot rules
- Follow the platform's policies: opt-in, the 24-hour customer service window and message templates on WhatsApp; opt-out with STOP.
- Queue outgoing messages to respect rate limits; retry failed sends.
- Store phone numbers and chats securely and delete them on request.

## Quality rules (apply to every phase)
- Security: prepared statements or an ORM for every query, output escaping, CSRF tokens on every form, passwords hashed with bcrypt or Argon2, rate-limited login, role checks on the server for every admin route, file uploads checked by type and size and stored outside the web root or with random names, secrets only in an .env file.
- Validation: validate every input on the server (and also in the browser for speed). Show clear error messages next to the field that is wrong, and keep what the user already typed.
- Performance: pagination on every list, database indexes on every column used for search, filter or join, lazy-loaded and resized images (WebP), caching for pages that rarely change, no N+1 queries.
- Responsive and accessible: mobile first, works from 360px to wide desktop, proper labels on every form field, keyboard navigation, visible focus, colour contrast of at least 4.5:1, alt text on images.
- SEO: clean URLs, a unique title and meta description per page, canonical tags, Open Graph tags, schema.org JSON-LD where it applies, an XML sitemap and robots.txt.
- Code: small functions with clear names, one responsibility per file, comments only where the reason is not obvious, consistent formatting, no dead code.
- Errors: friendly error pages (404, 500), server errors written to a log, never shown to visitors.
- Deliver with: a README (install steps, .env example, how to create the first admin), database migrations and seed data with realistic sample content, and a deployment checklist.

## How to work with me
Do not write code yet. First reply with:
1. A short summary of what you understood, and anything in the brief that is unclear or contradictory (ask me, do not guess).
2. The final tech stack, with a one-line reason for each choice.
3. The folder and file structure.
4. The full database schema: every table, column, type, index and relation.
5. Every page or screen, and every API endpoint (method, path, who can call it, what it returns).
6. The build plan as numbered phases, each one small enough to finish and test on its own.

Wait for me to reply "go". Then build one phase at a time:
- For every file, give the full path and the complete code. Never write "...", "rest of the code stays the same" or TODO.
- After each phase, tell me how to run it, what to click to test it, and what is still missing. Then wait for me to reply "next".
- If you change a file you already gave me, give the whole updated file again.
Open in ChatGPT Claude Perplexity

How to use this prompt

  1. Copy the prompt. Press Copy prompt and the full text goes to your clipboard.
  2. Fill the brackets. Use the form above, or replace [WhatsApp / Telegram], [BUSINESS AND WHAT IT SELLS], [WhatsApp Cloud API / Telegram Bot API / both], [LANGUAGES], [YES/NO, which model], [STACK or "you choose"] with your own details.
  3. Paste and send. Paste it into ChatGPT, Claude, Gemini and DeepSeek and send. Ask follow-up questions to refine the answer.

Why use this Build a WhatsApp or Telegram bot for a business prompt?

This build a whatsapp or telegram bot for a business prompt is written for a marketing agency running campaigns for several clients. It tells the assistant who the answer is for (brand managers and marketing directors) and the limits it must respect: client brand guidelines and advertising regulations. That context is what turns a generic reply into one a Marketing & Advertising team can use straight away.

Most people type a single line and get a generic answer back. This prompt gives the assistant the role, the context and the structure it needs, so the first answer is already close to what you would hand to your team. Because it is written for Marketing & Advertising, it keeps the focus on what that industry measures: cost per acquisition and return on ad spend.

How to get the best answer

  1. Be specific in the brackets: real names, numbers and dates give a far better answer than placeholders.
  2. Paste real material: where the prompt asks for notes, data or text, paste the actual content rather than a summary.
  3. Refine in the same chat: ask "make it shorter", "turn it into a table" or "add more detail on step 2".
  4. Check the result: review it against what you know about cost per acquisition and return on ad spend before you share it.

FAQ

Frequently asked questions

Which AI assistant works best with this Build a WhatsApp or Telegram bot for a business prompt?

It works in any chat assistant. It suits ChatGPT, Claude, Gemini and DeepSeek best. Paste it in, send it, and ask follow-up questions in the same chat.

What do I need to replace before sending it?

Replace the 6 highlighted brackets – [WhatsApp / Telegram], [BUSINESS AND WHAT IT SELLS], [WhatsApp Cloud API / Telegram Bot API / both], [LANGUAGES], [YES/NO, which model], [STACK or "you choose"] – with your own details. The more specific you are, the better the answer.

Is this prompt only for Marketing & Advertising?

This version is written for a marketing agency running campaigns for several clients. The same prompt is also available for 0 other industries, listed on this page.

Is it free to use?

Yes. Copy it as often as you like and use it in your own work. No sign-up is needed.

Can I trust the answer?

Treat it as a strong first draft. Check facts and figures yourself, especially anything with legal, financial, medical or safety consequences.

Keep exploring

Browse more Marketing & Advertising prompts