Automate WhatsApp Business tasks via Rube MCP (Composio): send messages, manage templates, upload media, and handle contacts. Always search tools first for current schemas.
Add this skill
npx mdskills install sickn33/whatsapp-automationComprehensive WhatsApp Business automation with clear workflows, tool sequences, and pitfall warnings
1---2name: whatsapp-automation3description: "Automate WhatsApp Business tasks via Rube MCP (Composio): send messages, manage templates, upload media, and handle contacts. Always search tools first for current schemas."4requires:5 mcp: [rube]6---78# WhatsApp Business Automation via Rube MCP910Automate WhatsApp Business operations through Composio's WhatsApp toolkit via Rube MCP.1112## Prerequisites1314- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)15- Active WhatsApp connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `whatsapp`16- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas17- WhatsApp Business API account required (not regular WhatsApp)1819## Setup2021**Get Rube MCP**: Add `https://rube.app/mcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.2223241. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds252. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `whatsapp`263. If connection is not ACTIVE, follow the returned auth link to complete WhatsApp Business setup274. Confirm connection status shows ACTIVE before running any workflows2829## Core Workflows3031### 1. Send a Text Message3233**When to use**: User wants to send a text message to a WhatsApp contact3435**Tool sequence**:361. `WHATSAPP_GET_PHONE_NUMBERS` - List available business phone numbers [Prerequisite]372. `WHATSAPP_SEND_MESSAGE` - Send a text message [Required]3839**Key parameters**:40- `to`: Recipient phone number in international format (e.g., '+14155551234')41- `body`: Message text content42- `phone_number_id`: Business phone number ID to send from4344**Pitfalls**:45- Phone numbers must be in international E.164 format with country code46- Messages outside the 24-hour window require approved templates47- The 24-hour window starts when the customer last messaged you48- Business-initiated conversations require template messages first4950### 2. Send Template Messages5152**When to use**: User wants to send pre-approved template messages for outbound communication5354**Tool sequence**:551. `WHATSAPP_GET_MESSAGE_TEMPLATES` - List available templates [Prerequisite]562. `WHATSAPP_GET_TEMPLATE_STATUS` - Check template approval status [Optional]573. `WHATSAPP_SEND_TEMPLATE_MESSAGE` - Send the template message [Required]5859**Key parameters**:60- `template_name`: Name of the approved template61- `language_code`: Template language (e.g., 'en_US')62- `to`: Recipient phone number63- `components`: Template variable values and parameters6465**Pitfalls**:66- Templates must be approved by Meta before use67- Template variables must match the expected count and format68- Sending unapproved or rejected templates returns errors69- Language code must match an approved translation of the template7071### 3. Send Media Messages7273**When to use**: User wants to send images, documents, or other media7475**Tool sequence**:761. `WHATSAPP_UPLOAD_MEDIA` - Upload media to WhatsApp servers [Required]772. `WHATSAPP_SEND_MEDIA_BY_ID` - Send media using the uploaded media ID [Required]78 OR793. `WHATSAPP_SEND_MEDIA` - Send media using a public URL [Alternative]8081**Key parameters**:82- `media_url`: Public URL of the media (for SEND_MEDIA)83- `media_id`: ID from upload response (for SEND_MEDIA_BY_ID)84- `type`: Media type ('image', 'document', 'audio', 'video', 'sticker')85- `caption`: Optional caption for the media8687**Pitfalls**:88- Uploaded media IDs are temporary and expire after a period89- Media size limits vary by type (images: 5MB, videos: 16MB, documents: 100MB)90- Supported formats: images (JPEG, PNG), videos (MP4, 3GPP), documents (PDF, etc.)91- SEND_MEDIA requires a publicly accessible HTTPS URL9293### 4. Reply to Messages9495**When to use**: User wants to reply to an incoming WhatsApp message9697**Tool sequence**:981. `WHATSAPP_SEND_REPLY` - Send a reply to a specific message [Required]99100**Key parameters**:101- `message_id`: ID of the message being replied to102- `to`: Recipient phone number103- `body`: Reply text content104105**Pitfalls**:106- message_id must be from a message received within the 24-hour window107- Replies appear as quoted messages in the conversation108- The original message must still exist (not deleted) for the quote to display109110### 5. Manage Business Profile and Templates111112**When to use**: User wants to view or manage their WhatsApp Business profile113114**Tool sequence**:1151. `WHATSAPP_GET_BUSINESS_PROFILE` - Get business profile details [Optional]1162. `WHATSAPP_GET_PHONE_NUMBERS` - List registered phone numbers [Optional]1173. `WHATSAPP_GET_PHONE_NUMBER` - Get details for a specific number [Optional]1184. `WHATSAPP_CREATE_MESSAGE_TEMPLATE` - Create a new template [Optional]1195. `WHATSAPP_GET_MESSAGE_TEMPLATES` - List all templates [Optional]120121**Key parameters**:122- `phone_number_id`: Business phone number ID123- `template_name`: Name for the new template124- `category`: Template category (MARKETING, UTILITY, AUTHENTICATION)125- `language`: Template language code126127**Pitfalls**:128- New templates require Meta review before they can be used129- Template names must be lowercase with underscores (no spaces)130- Category affects pricing and approval criteria131- Templates have specific formatting requirements for headers, body, and buttons132133### 6. Share Contacts134135**When to use**: User wants to send contact information via WhatsApp136137**Tool sequence**:1381. `WHATSAPP_SEND_CONTACTS` - Send contact cards [Required]139140**Key parameters**:141- `to`: Recipient phone number142- `contacts`: Array of contact objects with name, phone, email details143144**Pitfalls**:145- Contact objects must follow the WhatsApp Business API contact schema146- At least a name field is required for each contact147- Phone numbers in contacts should include country codes148149## Common Patterns150151### 24-Hour Messaging Window152153- Customers must message you first to open a conversation window154- Within 24 hours of their last message, you can send free-form messages155- After 24 hours, only approved template messages can be sent156- Template messages can re-open the conversation window157158### Phone Number Resolution159160```1611. Call WHATSAPP_GET_PHONE_NUMBERS1622. Extract phone_number_id for your business number1633. Use phone_number_id in all send operations164```165166### Media Upload Flow167168```1691. Call WHATSAPP_UPLOAD_MEDIA with the file1702. Extract media_id from response1713. Call WHATSAPP_SEND_MEDIA_BY_ID with media_id1724. OR use WHATSAPP_SEND_MEDIA with a public URL directly173```174175## Known Pitfalls176177**Phone Number Format**:178- Always use E.164 format: +[country code][number] (e.g., '+14155551234')179- Do not include dashes, spaces, or parentheses180- Country code is required; local numbers without it will fail181182**Messaging Restrictions**:183- Business-initiated messages require templates outside the 24-hour window184- Template messages cost money per conversation185- Rate limits apply per phone number and per account186187**Media Handling**:188- Uploaded media expires; use promptly after upload189- Media URLs must be publicly accessible HTTPS190- Stickers have specific requirements (WebP format, 512x512 pixels)191192**Template Management**:193- Template review can take up to 24 hours194- Rejected templates need to be fixed and resubmitted195- Template variables use double curly braces: {{1}}, {{2}}, etc.196197## Quick Reference198199| Task | Tool Slug | Key Params |200|------|-----------|------------|201| Send message | WHATSAPP_SEND_MESSAGE | to, body |202| Send template | WHATSAPP_SEND_TEMPLATE_MESSAGE | template_name, to, language_code |203| Upload media | WHATSAPP_UPLOAD_MEDIA | (file params) |204| Send media by ID | WHATSAPP_SEND_MEDIA_BY_ID | media_id, to, type |205| Send media by URL | WHATSAPP_SEND_MEDIA | media_url, to, type |206| Reply to message | WHATSAPP_SEND_REPLY | message_id, to, body |207| Send contacts | WHATSAPP_SEND_CONTACTS | to, contacts |208| Get media | WHATSAPP_GET_MEDIA | media_id |209| List phone numbers | WHATSAPP_GET_PHONE_NUMBERS | (none) |210| Get phone number | WHATSAPP_GET_PHONE_NUMBER | phone_number_id |211| Get business profile | WHATSAPP_GET_BUSINESS_PROFILE | phone_number_id |212| Create template | WHATSAPP_CREATE_MESSAGE_TEMPLATE | template_name, category, language |213| List templates | WHATSAPP_GET_MESSAGE_TEMPLATES | (none) |214| Check template status | WHATSAPP_GET_TEMPLATE_STATUS | template_id |215
Full transparency — inspect the skill content before installing.