whatsapp-bot-builder
Builds WhatsApp bots and integrations using the WhatsApp Business API (Cloud API). Use when the user wants to create a WhatsApp bot, send template messages, handle incoming messages, build interactive lists and buttons, process media, or automate customer communication via WhatsApp. Trigger words: whatsapp bot, whatsapp business api, whatsapp integration, whatsapp cloud api, whatsapp template, whatsapp webhook, whatsapp automation, whatsapp chatbot, meta business, whatsapp flows.
What this skill does
# WhatsApp Bot Builder
## Overview
Builds WhatsApp bots using the official Cloud API (hosted by Meta). Covers account setup, webhook configuration, sending and receiving messages, template messages for outbound campaigns, interactive components (buttons, lists, flows), media handling, and production deployment. Does NOT use unofficial libraries — only the official WhatsApp Business Platform.
## Instructions
### 1. Account Setup
1. Create a Meta Business account at https://business.facebook.com
2. Go to https://developers.facebook.com → Create App → Business type
3. Add "WhatsApp" product to the app
4. In WhatsApp > Getting Started:
- Note the **Phone Number ID** and **WhatsApp Business Account ID**
- Generate a temporary access token (valid 24h) or create a System User token (permanent)
5. Add a test phone number or verify your business number
**Required credentials:**
```env
WHATSAPP_TOKEN=EAAxxxxxxx # Permanent System User token
WHATSAPP_PHONE_ID=123456789 # Phone Number ID
WHATSAPP_BUSINESS_ID=987654321 # Business Account ID
WHATSAPP_VERIFY_TOKEN=my_secret # Webhook verification token (you choose this)
```
### 2. Webhook Setup
WhatsApp sends incoming messages via webhooks:
```javascript
const express = require('express');
const app = express();
app.use(express.json());
// Webhook verification (GET)
app.get('/webhook', (req, res) => {
const mode = req.query['hub.mode'];
const token = req.query['hub.verify_token'];
const challenge = req.query['hub.challenge'];
if (mode === 'subscribe' && token === process.env.WHATSAPP_VERIFY_TOKEN) {
res.status(200).send(challenge);
} else {
res.sendStatus(403);
}
});
// Incoming messages (POST)
app.post('/webhook', (req, res) => {
const entry = req.body.entry?.[0];
const change = entry?.changes?.[0];
const message = change?.value?.messages?.[0];
if (message) {
handleMessage(message, change.value.metadata.phone_number_id);
}
res.sendStatus(200); // Always respond 200 quickly
});
```
Register webhook URL in Meta Developer Console → WhatsApp → Configuration.
Subscribe to: `messages`, `message_status`, `message_template_status_update`.
### 3. Sending Messages
**Text message:**
```javascript
async function sendText(to, text) {
await fetch(`https://graph.facebook.com/v21.0/${PHONE_ID}/messages`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
messaging_product: 'whatsapp',
to: to, // Phone number with country code: '14155552671'
type: 'text',
text: { body: text }
})
});
}
```
**Interactive buttons (max 3):**
```javascript
{
messaging_product: 'whatsapp',
to: to,
type: 'interactive',
interactive: {
type: 'button',
body: { text: 'How can I help you?' },
action: {
buttons: [
{ type: 'reply', reply: { id: 'support', title: '🛠 Support' } },
{ type: 'reply', reply: { id: 'sales', title: '💰 Sales' } },
{ type: 'reply', reply: { id: 'info', title: 'ℹ️ Info' } }
]
}
}
}
```
**Interactive list (up to 10 items per section, 10 sections):**
```javascript
{
type: 'interactive',
interactive: {
type: 'list',
body: { text: 'Choose a product category:' },
action: {
button: 'View Categories',
sections: [{
title: 'Electronics',
rows: [
{ id: 'phones', title: 'Phones', description: 'Latest smartphones' },
{ id: 'laptops', title: 'Laptops', description: 'Work and gaming' }
]
}]
}
}
}
```
### 4. Template Messages
Template messages are required for initiating conversations (outbound). They must be pre-approved by Meta.
**Creating templates:**
- Go to WhatsApp Manager → Message Templates
- Categories: Marketing, Utility, Authentication
- Templates support variables: `{{1}}`, `{{2}}`, etc.
- Approval takes minutes to hours
**Sending a template:**
```javascript
{
messaging_product: 'whatsapp',
to: to,
type: 'template',
template: {
name: 'order_confirmation',
language: { code: 'en_US' },
components: [{
type: 'body',
parameters: [
{ type: 'text', text: 'ORD-12345' },
{ type: 'text', text: '$49.99' }
]
}]
}
}
```
### 5. Media Handling
**Send image:**
```javascript
{
messaging_product: 'whatsapp',
to: to,
type: 'image',
image: {
link: 'https://example.com/photo.jpg', // Public URL
caption: 'Your order receipt'
}
}
```
**Receive media:** Extract `messages[0].image.id`, then:
```javascript
// Get media URL
const media = await fetch(`https://graph.facebook.com/v21.0/${mediaId}`, {
headers: { 'Authorization': `Bearer ${TOKEN}` }
}).then(r => r.json());
// Download the file
const file = await fetch(media.url, {
headers: { 'Authorization': `Bearer ${TOKEN}` }
});
```
Supported: images (5MB), video (16MB), audio (16MB), documents (100MB), stickers.
### 6. Conversation Pricing
WhatsApp charges per 24-hour conversation window:
- **Service conversations** (user-initiated): Free first 1,000/month, then ~$0.005-0.08 depending on country
- **Marketing/Utility conversations** (business-initiated): ~$0.01-0.15 per conversation
- **Authentication**: ~$0.005-0.09
The 24h window opens when you first reply or send a template. All messages within that window are one conversation.
### 7. Rate Limits
- **New business accounts**: 250 business-initiated conversations/24h
- **Verified accounts**: 1,000/24h, scaling to 10K, 100K, unlimited based on quality
- **API calls**: 80 messages/sec for Cloud API
- **Template submissions**: 100/hour for creation
### 8. Deployment
- **Must have HTTPS** — WhatsApp requires TLS for webhooks
- Use ngrok for local development
- Production: any Node.js host with SSL (Railway, Render, VPS with Caddy/nginx)
- Implement message deduplication (WhatsApp may retry webhook deliveries)
## Examples
### Example 1: Customer Support Bot
**Input:** "Build a WhatsApp bot for our e-commerce store. Customers can check order status, request returns, and talk to a human agent."
**Output:** A Node.js webhook server with:
- Welcome message with 3 reply buttons (Order Status / Return / Talk to Agent)
- Order status flow: asks for order number, queries database, returns status with tracking link
- Return flow: multi-step conversation collecting order number, reason, photo of item
- Agent handoff: notifies support team in a shared WhatsApp group, bridges messages
- Auto-reply outside business hours with template message
### Example 2: Appointment Booking Bot
**Input:** "Create a WhatsApp bot for a dental clinic. Patients book appointments, get reminders, and can reschedule."
**Output:** A Node.js app with:
- Interactive list showing available time slots by date
- Booking confirmation with template message (approved by Meta)
- 24h reminder template sent via cron job
- Reschedule flow with new slot selection
- Integration with Google Calendar API for availability
## Guidelines
- Always respond HTTP 200 to webhooks within 5 seconds (process async)
- Use template messages for initiating conversations — free-form messages only work in the 24h reply window
- Implement idempotency — WhatsApp retries webhook deliveries on timeout
- Store `wa_id` (WhatsApp ID) not phone number for user identification
- Handle message status updates (`sent`, `delivered`, `read`, `failed`) for tracking
- Keep button titles under 20 characters, list row titles under 24 characters
- Test thoroughly with the test phone number before going to production
- Meta can reject template messages — keep them professional and compliant
- Implement conversation state with Redis or database (not in-memory)
- For high volume: use a message queue between webhook receiver and processor
- Never expose your permanent token — use environment variables
- WhatsApp Flows (form-based UI) is available for more complex interactionRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.