| name | sendblue-imessage |
| description | iMessage/SMS interface for freight brokers via Sendblue. Production setup is one VPS per client, one dedicated Sendblue number per client, and one webhook URL per VPS. Use when setting up broker texting, dedicated lines, or webhook deployment. |
Sendblue iMessage Integration
This is the production setup:
One client = one VPS = one OpenClaw instance = one Sendblue number = one webhook URL
You keep one master Sendblue account with one API key + secret.
Each client gets:
- their own dedicated Sendblue number on your account
- their own VPS
- their own webhook URL
- their own Outlook/Gmail connection
Final Flow
Broker texts dedicated Sendblue number
→ Sendblue receives it on your account
→ Sendblue POSTs to that client's VPS webhook URL
→ webhook_server.py runs on that VPS
→ email / document workflows run
→ response goes back through Sendblue API
No ngrok. No laptop dependency. No central router required.
Required Env Vars on Each VPS
Use skills/sendblue-imessage/.env.example.
SENDBLUE_API_KEY=...
SENDBLUE_API_SECRET=...
BROKER_NAME=Acme Logistics
SENDBLUE_FROM_NUMBER=+14155551234
EMAIL_TYPE=outlook
OUTLOOK_CLIENT_ID=...
OUTLOOK_CLIENT_SECRET=...
OUTLOOK_TENANT_ID=...
OUTLOOK_USER_EMAIL=broker@acme.com
Or Gmail instead of Outlook:
EMAIL_TYPE=gmail
EMAIL_HOST=imap.gmail.com
EMAIL_USER=broker@gmail.com
EMAIL_PASS=app-password
Core Files
skills/sendblue-imessage/
├── SKILL.md
├── .env.example
├── scripts/
│ ├── sendblue_client.py
│ ├── client_config.py
│ └── webhook_server.py
└── references/
├── vps-deploy.md
├── freight-sendblue.service
└── nginx-sendblue.conf
What Each File Does
sendblue_client.py — send messages, list lines, provision numbers, register webhook URLs
webhook_server.py — receives inbound texts and runs the freight workflows
.env.example — per-client VPS env template
vps-deploy.md — exact deployment flow
freight-sendblue.service — systemd service example
nginx-sendblue.conf — nginx reverse proxy example
Quick Setup
1. Install deps
pip3 install flask requests gunicorn
2. Fill env file
cp .env.example /opt/freight-broker/.env
nano /opt/freight-broker/.env
3. Start locally
cd skills/sendblue-imessage/scripts
set -a
source /opt/freight-broker/.env
set +a
python3 webhook_server.py --port 8080
4. Test health
curl http://127.0.0.1:8080/health
5. Register the webhook URL
python3 sendblue_client.py --webhook-add https://client1.yourdomain.com/webhook
Broker Commands
Broker texts their dedicated number:
help
status
check emails
pending quotes
carrier emails
reminders
Example
Broker → check emails
AI → 📬 3 new email(s), 2 quotes, 1 carrier replies
💰 QUOTE REQUEST - ABC Manufacturing
🚛 CARRIER - dispatch@xyztucking.com
Deployment
Read: references/vps-deploy.md
That file covers:
- VPS package install
- env file setup
- gunicorn
- nginx
- systemd
- webhook registration
- production testing
Important
If your Sendblue secret was pasted in chat, rotate it after setup. Don't leave live creds hanging around like candy on Halloween.