WhatsApp Automation (Green API)
First time? If
setup_complete: falseabove, run./SETUP.mdfirst, then setsetup_complete: true.
Send messages and get group information via WhatsApp.
Workflow
- •Get contact - Use
get-contactskill or ask user for phone - •Send message - Text, voice, image, or file
- •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 | 972501234567@c.us |
+972501234567 | 972501234567@c.us |
972501234567 | 972501234567@c.us |
Default Numbers
Configure your test number in skill for quick access:
| Alias | Number |
|---|---|
| myself / me / test | YOUR_PHONE_NUMBER |
Notes
- •Use
--dry-runto preview before bulk operations - •Voice notes require
ffmpeginstalled - •Rate limits apply when sending many messages