Whatsapp automation

From davepoon/buildwithclaude · View interactive version

Whatsapp automation is an AI agent skill from the GitHub repository davepoon/buildwithclaude. Automate WhatsApp Business tasks via Rube MCP (Composio): send messages, manage templates, upload media, and handle contacts. Always search tools first for current schemas.

How to use this skill

Skill file

WhatsApp Business Automation via Rube MCP

Automate WhatsApp Business operations through Composio's WhatsApp toolkit via Rube MCP.

Toolkit docs: composio.dev/toolkits/whatsapp

Prerequisites

Setup

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.

  1. Verify Rube MCP is available by confirming RUBE_SEARCH_TOOLS responds
  2. Call RUBE_MANAGE_CONNECTIONS with toolkit whatsapp
  3. If connection is not ACTIVE, follow the returned auth link to complete WhatsApp Business setup
  4. Confirm connection status shows ACTIVE before running any workflows

Core Workflows

1. Send a Text Message

When to use: User wants to send a text message to a WhatsApp contact

Tool sequence:

  1. WHATSAPP_GET_PHONE_NUMBERS - List available business phone numbers [Prerequisite]
  2. WHATSAPP_SEND_MESSAGE - Send a text message [Required]

Key parameters:

Pitfalls:

2. Send Template Messages

When to use: User wants to send pre-approved template messages for outbound communication

Tool sequence:

  1. WHATSAPP_GET_MESSAGE_TEMPLATES - List available templates [Prerequisite]
  2. WHATSAPP_GET_TEMPLATE_STATUS - Check template approval status [Optional]
  3. WHATSAPP_SEND_TEMPLATE_MESSAGE - Send the template message [Required]

Key parameters:

Pitfalls:

3. Send Media Messages

When to use: User wants to send images, documents, or other media

Tool sequence:

  1. WHATSAPP_UPLOAD_MEDIA - Upload media to WhatsApp servers [Required]
  2. WHATSAPP_SEND_MEDIA_BY_ID - Send media using the uploaded media ID [Required]

OR

  1. WHATSAPP_SEND_MEDIA - Send media using a public URL [Alternative]

Key parameters:

Pitfalls:

4. Reply to Messages

When to use: User wants to reply to an incoming WhatsApp message

Tool sequence:

  1. WHATSAPP_SEND_REPLY - Send a reply to a specific message [Required]

Key parameters:

Pitfalls:

5. Manage Business Profile and Templates

When to use: User wants to view or manage their WhatsApp Business profile

Tool sequence:

  1. WHATSAPP_GET_BUSINESS_PROFILE - Get business profile details [Optional]
  2. WHATSAPP_GET_PHONE_NUMBERS - List registered phone numbers [Optional]
  3. WHATSAPP_GET_PHONE_NUMBER - Get details for a specific number [Optional]
  4. WHATSAPP_CREATE_MESSAGE_TEMPLATE - Create a new template [Optional]
  5. WHATSAPP_GET_MESSAGE_TEMPLATES - List all templates [Optional]

Key parameters:

Pitfalls:

6. Share Contacts

When to use: User wants to send contact information via WhatsApp

Tool sequence:

  1. WHATSAPP_SEND_CONTACTS - Send contact cards [Required]

Key parameters:

Pitfalls:

Common Patterns

24-Hour Messaging Window

Phone Number Resolution

1. Call WHATSAPP_GET_PHONE_NUMBERS
2. Extract phone_number_id for your business number
3. Use phone_number_id in all send operations

Media Upload Flow

1. Call WHATSAPP_UPLOAD_MEDIA with the file
2. Extract media_id from response
3. Call WHATSAPP_SEND_MEDIA_BY_ID with media_id
4. OR use WHATSAPP_SEND_MEDIA with a public URL directly

Known Pitfalls

Phone Number Format:

Messaging Restrictions:

Media Handling:

Template Management:

Quick Reference

| Task | Tool Slug | Key Params |

|------|-----------|------------|

| Send message | WHATSAPP_SEND_MESSAGE | to, body |

| Send template | WHATSAPP_SEND_TEMPLATE_MESSAGE | template_name, to, language_code |

| Upload media | WHATSAPP_UPLOAD_MEDIA | (file params) |

| Send media by ID | WHATSAPP_SEND_MEDIA_BY_ID | media_id, to, type |

| Send media by URL | WHATSAPP_SEND_MEDIA | media_url, to, type |

| Reply to message | WHATSAPP_SEND_REPLY | message_id, to, body |

| Send contacts | WHATSAPP_SEND_CONTACTS | to, contacts |

| Get media | WHATSAPP_GET_MEDIA | media_id |

| List phone numbers | WHATSAPP_GET_PHONE_NUMBERS | (none) |

| Get phone number | WHATSAPP_GET_PHONE_NUMBER | phone_number_id |

| Get business profile | WHATSAPP_GET_BUSINESS_PROFILE | phone_number_id |

| Create template | WHATSAPP_CREATE_MESSAGE_TEMPLATE | template_name, category, language |

| List templates | WHATSAPP_GET_MESSAGE_TEMPLATES | (none) |

| Check template status | WHATSAPP_GET_TEMPLATE_STATUS | template_id |


Powered by Composio

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.