WhatsApp + Claude auto-reply integration - #35
Open
brando90 wants to merge 1 commit into
Open
Conversation
…ss, tests) Expands whatsapp_uu.py with WhatsAppClaudeBot class for Claude-powered auto-replies, Flask webhook server for receiving Meta webhook callbacks, conversation history management, and message extraction/verification. Adds dry-run test suite and flask optional dependency. Closes #34. https://claude.ai/code/session_01TYqKRGFxpAo5GY1SnGFLh3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WhatsAppClaudeBotclass + Flask webhook server towhatsapp_uu.pyso incoming WhatsApp messages get auto-replied by Claudeplayground/whatsapp_claude/test_whatsapp_claude_bot.py) — all 6 tests pass with no API keys neededflaskas optional dependency (pip install -e ".[whatsapp]")Closes #34
Step-by-Step Setup Guide (what you need to do)
Step 1: Create a Meta Business Account (5 min)
Step 2: Create a Meta Developer App (5 min)
Step 3: Add WhatsApp to Your App (2 min)
Step 4: Get Your Credentials (5 min)
In the Meta Developer Dashboard, go to WhatsApp → API Setup. You'll see:
123456789012345)whatsapp_business_messagingpermissionStep 5: Save Your Credentials Locally (2 min)
Step 6: Expose Your Local Server to the Internet (2 min)
Meta needs to reach your computer via HTTPS. Easiest way:
ngrok will show something like:
https://abc123.ngrok-free.app— copy this URL.Step 7: Configure the Webhook in Meta (3 min)
/webhook, e.g.:https://abc123.ngrok-free.app/webhookverify_tokenyou put in your config (e.g.,uutils_whatsapp_2024)messagesStep 8: Start the Bot! (1 min)
Important: Start the bot BEFORE Step 7's "Verify and Save" — Meta needs to reach
/webhookto verify.Step 9: Test It
Quick Reference — What Each Credential Is
access_tokenphone_number_idverify_tokenapp_secretANTHROPIC_API_KEYTest plan
python playground/whatsapp_claude/test_whatsapp_claude_bot.pypython playground/whatsapp_claude/test_whatsapp_claude_bot.py --claudepython playground/whatsapp_claude/test_whatsapp_claude_bot.py --fullhttps://claude.ai/code/session_01TYqKRGFxpAo5GY1SnGFLh3