home / skills / aviz85 / claude-skills-library / whatsapp
This skill helps you send WhatsApp messages, voice notes, and images via Green API, and retrieve group members for streamlined automation workflows.
npx playbooks add skill aviz85/claude-skills-library --skill whatsappReview the files below or copy the command above to add this skill to your agents.
---
name: whatsapp
description: "WhatsApp automation using Green API. Send messages, voice notes, images, and get group members."
version: "1.0.0"
author: aviz85
tags:
- whatsapp
- messaging
- automation
enhancedBy:
- get-contact: "Auto-lookup contact by name. Without it: ask user for phone directly"
- speech-generator: "Generate voice audio with TTS. Without it: send existing audio files only"
setup: "./SETUP.md"
setup_complete: false
---
# WhatsApp Automation (Green API)
> **First time?** If `setup_complete: false` above, run `./SETUP.md` first, then set `setup_complete: true`.
Send messages and get group information via WhatsApp.
## Workflow
1. **Get contact** - Use `get-contact` skill or ask user for phone
2. **Send message** - Text, voice, image, or file
3. **Confirm delivery** - Check response for success
## Scripts
All scripts in `scripts/` folder:
| Script | Use |
|--------|-----|
| `send-message.ts` | Text messages |
| `send-voice.ts` | Voice notes (converts to OGG) |
| `send-image.ts` | Images with captions |
| `get-group-members.ts` | Extract group phone numbers |
## Quick Examples
```bash
cd scripts/
# Text message
npx ts-node send-message.ts --phone "972501234567" --message "Hello!"
# Voice note
npx ts-node send-voice.ts --phone "972501234567" --audio "/path/audio.mp3"
# Image with caption
npx ts-node send-image.ts --phone "972501234567" --image "/path/image.jpg" --caption "Check this!"
# Preview without sending
npx ts-node send-message.ts --phone "972501234567" --message "Test" --dry-run
```
## Phone Formats
| Input | Normalized |
|-------|------------|
| `0501234567` | `[email protected]` |
| `+972501234567` | `[email protected]` |
| `972501234567` | `[email protected]` |
## Default Numbers
Configure your test number in skill for quick access:
| Alias | Number |
|-------|--------|
| **myself / me / test** | `YOUR_PHONE_NUMBER` |
## Notes
- Use `--dry-run` to preview before bulk operations
- Voice notes require `ffmpeg` installed
- Rate limits apply when sending many messages
This skill automates WhatsApp messaging using the Green API to send text, voice notes, images, and to retrieve group member lists. It provides ready-to-run TypeScript scripts for common tasks and simple phone normalization and dry-run options for safe testing. It is focused on practical automation for notifications, media delivery, and group data extraction.
The skill exposes scripts that call Green API endpoints to send messages and media or to query group members. Phone inputs are normalized to the required WhatsApp format, audio files are converted to OGG for voice notes, and responses include delivery/status checks so you can confirm success. A dry-run mode lets you preview payloads without sending live messages.
Do I need any external tools to send voice notes?
Yes — ffmpeg is required to convert audio files to the OGG format used by WhatsApp voice notes.
How should I format phone numbers?
You can input local or international formats (e.g., 0501234567 or +972501234567); the scripts normalize them to the WhatsApp ID format like [email protected].