Skip to content

Commit dba51be

Browse files
Prospedaclaude
andcommitted
Add Agentic SDR Army - Telegram Command Center
Four specialized AI agents working 24/7: - SCOUT: Research prospects, enrich contacts, monitor signals - WRITER: Personalized emails, sequences, reply handling - CALLER: Voice notes in cloned voice, AI calls, voicemails - CLOSER: Payment links, proposals, pipeline management Integrations: - HubSpot (CRM) - Apollo (enrichment) - Gmail (send emails) - ElevenLabs (voice cloning) - Vapi (AI calls) - Stripe (payments) Commands accessible via Telegram: /scout, /write, /call, /invoice, /pipeline, etc. See docs/AGENTIC-SDR-ARMY.md for full design doc. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ee340c3 commit dba51be

16 files changed

Lines changed: 4095 additions & 0 deletions

File tree

bots/telegram/.env.example

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# GTM Command Center Configuration
2+
# Copy this file to .env and fill in your values
3+
4+
# =============================================================================
5+
# REQUIRED: Telegram Bot
6+
# =============================================================================
7+
# Create a bot via @BotFather on Telegram
8+
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
9+
10+
# Your Telegram user ID (for authorization)
11+
# Get it by messaging @userinfobot
12+
AUTHORIZED_TELEGRAM_IDS=123456789,987654321
13+
14+
# =============================================================================
15+
# REQUIRED: AI
16+
# =============================================================================
17+
# Anthropic API key for Claude
18+
ANTHROPIC_API_KEY=your_anthropic_api_key
19+
20+
# =============================================================================
21+
# OPTIONAL: CRM (HubSpot)
22+
# =============================================================================
23+
# HubSpot Private App token
24+
# Settings → Integrations → Private Apps → Create app
25+
HUBSPOT_API_KEY=your_hubspot_api_key
26+
27+
# =============================================================================
28+
# OPTIONAL: Enrichment (Apollo)
29+
# =============================================================================
30+
# Apollo API key
31+
# Settings → Integrations → API Keys
32+
APOLLO_API_KEY=your_apollo_api_key
33+
34+
# =============================================================================
35+
# OPTIONAL: Email (Gmail)
36+
# =============================================================================
37+
# Gmail OAuth access token
38+
# Requires OAuth app setup - see docs
39+
GMAIL_ACCESS_TOKEN=your_gmail_oauth_token
40+
41+
# =============================================================================
42+
# OPTIONAL: Voice (ElevenLabs)
43+
# =============================================================================
44+
# ElevenLabs API key
45+
ELEVENLABS_API_KEY=your_elevenlabs_api_key
46+
47+
# Your cloned voice ID (from ElevenLabs dashboard)
48+
ELEVENLABS_VOICE_ID=your_voice_id
49+
50+
# =============================================================================
51+
# OPTIONAL: Voice Calls (Vapi)
52+
# =============================================================================
53+
# Vapi API key
54+
VAPI_API_KEY=your_vapi_api_key
55+
56+
# Your Vapi assistant ID
57+
VAPI_ASSISTANT_ID=your_assistant_id
58+
59+
# Your Vapi phone number ID
60+
VAPI_PHONE_NUMBER_ID=your_phone_number_id
61+
62+
# =============================================================================
63+
# OPTIONAL: Payments (Stripe)
64+
# =============================================================================
65+
# Stripe secret key (use test key for development)
66+
STRIPE_SECRET_KEY=sk_test_your_stripe_key
67+
68+
# URL to redirect after successful payment
69+
STRIPE_SUCCESS_URL=https://gtm-skills.com/thanks

bots/telegram/README.md

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
# GTM Command Center
2+
3+
Control your Agentic SDR Army from Telegram, WhatsApp, or Slack.
4+
5+
```
6+
/scout acme.com → Research this company
7+
/write sarah@acme.com → Draft personalized email
8+
/call sarah → Voice note in your voice
9+
/invoice sarah $500 → Send payment link
10+
```
11+
12+
## The Four Agents
13+
14+
| Agent | Mission | Commands |
15+
|-------|---------|----------|
16+
| **SCOUT** | Research 24/7 | `/scout`, `/enrich` |
17+
| **WRITER** | Personalized outreach | `/write`, `/sequence`, `/reply` |
18+
| **CALLER** | Voice notes & calls | `/call`, `/voicemail` |
19+
| **CLOSER** | Payments & deals | `/invoice`, `/proposal`, `/pipeline` |
20+
21+
## Quick Start
22+
23+
### 1. Create Telegram Bot
24+
25+
1. Message [@BotFather](https://t.me/BotFather) on Telegram
26+
2. Send `/newbot` and follow prompts
27+
3. Copy your bot token
28+
29+
### 2. Configure Environment
30+
31+
```bash
32+
cd bots/telegram
33+
cp .env.example .env
34+
```
35+
36+
Edit `.env` with your credentials:
37+
38+
```bash
39+
# Required
40+
TELEGRAM_BOT_TOKEN=your_token
41+
ANTHROPIC_API_KEY=your_key
42+
AUTHORIZED_TELEGRAM_IDS=your_telegram_id
43+
44+
# Optional (enable as needed)
45+
HUBSPOT_API_KEY=your_key # CRM
46+
APOLLO_API_KEY=your_key # Enrichment
47+
ELEVENLABS_API_KEY=your_key # Voice cloning
48+
VAPI_API_KEY=your_key # AI calls
49+
STRIPE_SECRET_KEY=your_key # Payments
50+
```
51+
52+
### 3. Install & Run
53+
54+
```bash
55+
npm install
56+
npm run dev
57+
```
58+
59+
### 4. Test
60+
61+
Message your bot on Telegram:
62+
```
63+
/start
64+
/scout acme.com
65+
/write test@example.com
66+
```
67+
68+
## Commands
69+
70+
### SCOUT (Research)
71+
```
72+
/scout # Top 10 new prospects
73+
/scout acme.com # Deep research on company
74+
/scout "series B saas" # Find matching prospects
75+
/scout signals # Today's buying signals
76+
/scout enrich sarah@x.com # Get full contact profile
77+
```
78+
79+
### WRITER (Outreach)
80+
```
81+
/write # Today's outreach queue
82+
/write sarah@acme.com # Draft email to Sarah
83+
/write sarah --challenger # Draft with Challenger tonality
84+
/sequence john@beta.io # Start 5-email sequence
85+
/followup # Due follow-ups
86+
/replies # Pending replies
87+
/reply 47 --book # Reply to thread, push meeting
88+
```
89+
90+
### CALLER (Voice)
91+
```
92+
/call # Warm call list (engaged prospects)
93+
/call sarah # Voice note for Sarah
94+
/call sarah --live # AI-powered live call
95+
/voicemail john # Drop voicemail
96+
/callbacks # Who called back (hot leads!)
97+
```
98+
99+
### CLOSER (Payments)
100+
```
101+
/close # Deals ready to close
102+
/invoice sarah $500 # Send Stripe payment link
103+
/proposal acme # Generate proposal
104+
/stalled # Stalled deals to re-engage
105+
/pipeline # Pipeline summary
106+
/won acme $1500 # Log closed deal
107+
/lost beta "went dark" # Log lost deal
108+
```
109+
110+
### Status
111+
```
112+
/status # All agent activity
113+
/today # Daily briefing
114+
/help # All commands
115+
```
116+
117+
## Integrations
118+
119+
| Service | Purpose | Required? |
120+
|---------|---------|-----------|
121+
| Telegram | Command interface | Yes |
122+
| Anthropic | AI generation | Yes |
123+
| HubSpot | CRM | Recommended |
124+
| Apollo | Enrichment | Recommended |
125+
| Gmail | Send emails | Optional |
126+
| ElevenLabs | Voice cloning | Optional |
127+
| Vapi | AI calls | Optional |
128+
| Stripe | Payments | Optional |
129+
130+
## Architecture
131+
132+
```
133+
Telegram Message
134+
135+
Bot Router
136+
137+
┌─────────────────────────────────┐
138+
│ SCOUT WRITER CALLER CLOSER │
139+
│ ↓ ↓ ↓ ↓ │
140+
│ Apollo Gmail ElevenLabs Stripe │
141+
└─────────────────────────────────┘
142+
143+
HubSpot (source of truth)
144+
145+
Calendly/Stripe (conversions)
146+
```
147+
148+
## Tonalities
149+
150+
Available writing styles for `/write`:
151+
152+
| Flag | Style |
153+
|------|-------|
154+
| `--direct` | No fluff (default) |
155+
| `--blunt` | Shortest possible |
156+
| `--challenger` | Teach and push back |
157+
| `--exec` | C-suite brevity |
158+
| `--friendly` | Warm and personable |
159+
| `--hormozi` | Value-stacking |
160+
| `--voss` | Tactical empathy |
161+
162+
Example:
163+
```
164+
/write sarah@acme.com --challenger
165+
```
166+
167+
## Daily Briefing
168+
169+
The bot sends a daily briefing at 8am:
170+
171+
```
172+
Good morning! Here's your GTM update:
173+
174+
SCOUT found 12 new prospects overnight:
175+
• 3 high-priority (hiring signals)
176+
• Top pick: Sarah Chen, VP Sales @ Acme
177+
178+
WRITER sent 47 emails, 8 follow-ups:
179+
• 3 new replies (2 positive, 1 objection)
180+
• John @ Beta wants to book
181+
182+
CALLER left 5 voicemails:
183+
• 1 callback from Lisa @ Gamma
184+
185+
CLOSER has 2 deals pending:
186+
• Acme: Proposal viewed 3x
187+
• Beta: Payment link sent
188+
189+
Quick actions:
190+
→ /reply 23 (book John)
191+
→ /call lisa (she called back)
192+
```
193+
194+
## Production Deployment
195+
196+
### Railway
197+
198+
```bash
199+
railway login
200+
railway init
201+
railway up
202+
```
203+
204+
### Docker
205+
206+
```dockerfile
207+
FROM node:20-alpine
208+
WORKDIR /app
209+
COPY package*.json ./
210+
RUN npm ci
211+
COPY . .
212+
RUN npm run build
213+
CMD ["npm", "start"]
214+
```
215+
216+
## Voice Clone Setup
217+
218+
1. Record 30 minutes of natural speech
219+
2. Upload to ElevenLabs → Voice Lab → Add Voice
220+
3. Copy voice ID to `ELEVENLABS_VOICE_ID`
221+
4. Test with `/call test`
222+
223+
## Contributing
224+
225+
See [AGENTIC-SDR-ARMY.md](../../docs/AGENTIC-SDR-ARMY.md) for the full design doc.

bots/telegram/package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "gtm-command-center",
3+
"version": "1.0.0",
4+
"description": "Agentic SDR Army - Telegram Command Center",
5+
"main": "dist/index.js",
6+
"type": "module",
7+
"scripts": {
8+
"build": "tsc",
9+
"start": "node dist/index.js",
10+
"dev": "tsx watch src/index.ts"
11+
},
12+
"dependencies": {
13+
"telegraf": "^4.16.3",
14+
"@anthropic-ai/sdk": "^0.30.1",
15+
"@hubspot/api-client": "^11.2.0",
16+
"node-fetch": "^3.3.2",
17+
"dotenv": "^16.4.5"
18+
},
19+
"devDependencies": {
20+
"@types/node": "^20.11.0",
21+
"tsx": "^4.7.0",
22+
"typescript": "^5.3.3"
23+
}
24+
}

0 commit comments

Comments
 (0)