You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A FastAPI application that connects to the Notion API and provides RAG (Retrieval-Augmented Generation) capabilities using MongoDB Atlas Vector Search and Google AI Studio.
13
14
@@ -55,11 +56,17 @@ MIN_SIMILARITY_SCORE=0.7
55
56
CORS_ALLOW_ORIGINS=could be '*' or specific origins here
56
57
API_SECRET_KEY=generate_random_string_here
57
58
58
-
# WAHA configuration
59
+
# WAHA configuration (optional - use WAHA or Chatery for WhatsApp integration)
# Chatery configuration (optional - alternative to WAHA)
66
+
CHATERY_API_URL=https://api.chatery.com/v1
67
+
CHATERY_API_KEY=your_chatery_api_key_here
68
+
CHATERY_PHONE_NUMBER_ID=your_phone_number_id_here
69
+
CHATERY_WEBHOOK_SECRET=your_webhook_secret_here
63
70
```
64
71
65
72
### 2. MongoDB Atlas Setup
@@ -104,11 +111,15 @@ Once the server is running, visit:
104
111
- Click "Share" → "Invite"
105
112
- Search for your integration name and invite it
106
113
107
-
## WAHA (WhatsApp HTTP API) Setup
114
+
## WhatsApp Integrations
115
+
116
+
Cloud Brain supports two WhatsApp integration options: **WAHA** (self-hosted) and **Chatery** (Cloud API). You can use either one or both simultaneously with different phone numbers.
117
+
118
+
### Option 1: WAHA (WhatsApp HTTP API)
108
119
109
120
WAHA enables WhatsApp integration, allowing your application to receive and respond to WhatsApp messages with AI-generated answers based on your Notion content.
110
121
111
-
### Quick Setup
122
+
####Quick Setup
112
123
113
124
1.**Install and run WAHA** using Docker:
114
125
```bash
@@ -128,20 +139,65 @@ WAHA enables WhatsApp integration, allowing your application to receive and resp
128
139
129
140
4.**Set webhook URL** in WAHA dashboard to: `http://your-app-domain.com/waha/webhook`
130
141
131
-
### How it works
142
+
####How it works
132
143
- Incoming WhatsApp messages are sent to your application via webhook
133
144
- Only whitelisted numbers can interact with the bot
134
145
- Messages are processed through the RAG system and responses are sent back via WhatsApp
135
146
136
147
For detailed installation, configuration, and production deployment instructions, visit the [WAHA official documentation](https://waha.devlike.pro/docs/overview/quick-start).
137
148
138
-
### Host Waha on Sumopod
149
+
####Host WAHA on Sumopod
139
150
140
151
Instead of running WAHA locally, you can host WAHA+ on SumoPod, which offers low cost hosting (starts from IDR20K/month) for small projects like this one. Follow these steps:
141
152
- Sign up for an account on [SumoPod](https://sumopod.com/register?ref=397bb660-81e6-48b8-919d-c0868301d72f)
142
153
- Deploy your WAHA instance by clicking the "Deploy Now" button below.
143
154
- Once deployed, follow the setup guide above to configure your WAHA instance.
144
155
156
+
### Option 2: Chatery (WhatsApp Cloud API)
157
+
158
+
Chatery provides a cloud-based WhatsApp Business API integration without the need for self-hosting. This is a simpler alternative to WAHA for production deployments.
159
+
160
+
#### Quick Setup
161
+
162
+
1.**Create a Chatery account** and set up a WhatsApp Business connection:
163
+
- Sign up at [Chatery](https://chatery.com)
164
+
- Navigate to **Connections** > **Add New Connection** > **WhatsApp**
165
+
- Connect your WhatsApp Business phone number
166
+
167
+
2.**Get API credentials** from Chatery dashboard:
168
+
- Go to **Settings** > **API**
169
+
- Copy your API URL, API Key, and Phone Number ID
170
+
171
+
3.**Configure environment variables** in your `.env` file:
172
+
```env
173
+
# Chatery Configuration
174
+
CHATERY_API_URL=https://api.chatery.com/v1
175
+
CHATERY_API_KEY=your_chatery_api_key_here
176
+
CHATERY_PHONE_NUMBER_ID=your_phone_number_id_here
177
+
CHATERY_WEBHOOK_SECRET=your_webhook_secret_here
178
+
WHITELISTED_NUMBERS=1234567890,9876543210
179
+
```
180
+
181
+
4.**Set webhook URL** in Chatery dashboard:
182
+
```
183
+
https://your-domain.com/chatery/webhook
184
+
```
185
+
186
+
#### How it works
187
+
- Incoming WhatsApp messages are sent to your application via webhook
188
+
- Webhook requests are verified using the webhook secret
189
+
- Only whitelisted numbers can interact with the bot
190
+
- Messages are processed through the RAG system and responses are sent back via Chatery API
191
+
192
+
For detailed setup instructions, see the [Chatery Setup Guide](docs/chatery-setup.md).
193
+
194
+
#### Switching Between WAHA and Chatery
195
+
196
+
You can use either integration or both simultaneously:
197
+
-**Chatery only**: Fill in Chatery env vars, leave WAHA env vars empty
198
+
-**WAHA only**: Fill in WAHA env vars, leave Chatery env vars empty
199
+
-**Both**: Configure both with different phone numbers and webhook URLs
0 commit comments