Channel Setup
Connect CowNojo to the messaging app your team already uses. Pick a channel below and follow the steps.
๐ฌ
WhatsApp via Twilio
Sandbox free ยท Production ~$1/moโน๏ธ WhatsApp links each phone number to one farm role. The farm owner sets up first, then shares the Farm ID with workers so they can join.
1
Create a Twilio account
Go to twilio.com/try-twilio and sign up for free.
Free trial gives you ~$15 credit โ enough to test and go live.
2
Activate the WhatsApp Sandbox
- In Twilio Console โ Messaging โ Try it out โ Send a WhatsApp message
- You'll see a sandbox number (e.g.
+1 415 523 8886) and a join code likejoin copper-fish - From your WhatsApp, text that join code to the sandbox number to opt in
- Anyone testing must do this opt-in step first
๐ก For production (real business use), you'll need to purchase a dedicated Twilio number and apply for WhatsApp Business approval โ takes 1โ3 days.
3
Set the webhook URL
- Twilio Console โ Messaging โ Settings โ WhatsApp Sandbox Settings
- Under "When a message comes in", paste:
https://cownojo.com/api/webhook/whatsapp
- Set Method to HTTP POST
- Click Save
4
Add Twilio credentials to Vercel
In your Vercel dashboard โ Project โ Settings โ Environment Variables, add:
TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TWILIO_AUTH_TOKEN=your_auth_token_here
Find these in Twilio Console โ Account Info (top of dashboard). Redeploy after adding.
5
Test it
- Text the sandbox number from WhatsApp
- CowNojo responds with a welcome message
- Type
/setup My Ranchto create your farm - Share your Farm ID with workers โ they text
/join [Farm ID]
6
Go live (production)
Optional- Twilio Console โ Phone Numbers โ Buy a Number โ filter by WhatsApp capability
- Submit WhatsApp Business profile (name, description, category)
- Twilio reviews in 1โ3 business days
- Once approved, point the same webhook URL at your new number
- Workers text your number directly โ no opt-in code required
Commands โ Same on Every Channel
/setup [Farm Name]Create your farm (owner)/join [Farm ID]Join an existing farm (worker)/myidSee your Farm IDreg COW001 Angus 2023-05-01Register an animallog COW001 vaccine BVDLog a health eventweight COW001 450kgRecord body weightnote COW001 looks thin todayAdd a field note[send a photo]AI body condition assessmentstatusFull AI herd summaryhelpShow all commands