Marching Orders: Reply Handler Agent
Worker:
reply-handler-worker.jsQueue:reply-handlerTrigger: PlusVibe webhook (instant) + polling fallback (every 2hr) Last updated: 2026-04-11
Mission
Classify every inbound email reply, take the right action instantly, and never let a hot lead go cold or a bad email stay unblacklisted.
Classification → Action Map
| Classification | Action | Demo Site? | Reply? | Telegram? | Blacklist? |
|---|---|---|---|---|---|
| Interested | Create GHL contact + opportunity | YES — build first | YES — after demo is live | YES | No |
| Meeting Request | Create GHL contact + opportunity | YES — build first | YES — with booking link | YES | No |
| Question | Create GHL contact | No | YES — answer their question | YES | No |
| Want Video | Log + tag | No | YES — “putting together a video” | YES | No |
| Want Website | Log + tag | YES — build first | YES — “already built one for you” | YES | No |
| Phone Number | Trigger voice demo | No | YES — confirm received | YES | No |
| Not Interested | Mark DNC | No | No | No | YES — immediately |
| Unsubscribe | Full DNC | No | No | No | YES — immediately |
| Bounce | Full DNC | No | No | No | YES — immediately |
| OOO | Reschedule 7 days | No | No | No | No |
| Wrong Person | Log | No | No | No | No |
Critical Rules
- DEMO SITE BEFORE REPLY — For interested/meeting/website replies, NEVER send the reply until the demo site is live. The demo IS the sales pitch.
- BLACKLIST IN REAL TIME — Every negative reply (not interested, unsub, bounce) gets blacklisted IMMEDIATELY. Never delete blacklist entries.
- REPLY TO WHAT THEY SAID — Never send generic responses. Reference their specific words. If they asked about pricing, address pricing. If they said “tell me more about videos,” talk about videos.
- NO HALLUCINATION — Never make up facts about what we offer, pricing, or capabilities.
- PER-CAMPAIGN PROMPTS — Each campaign has its own reply prompt in the campaign JSON. Load it. Use it. Don’t use a generic fallback.
Reply Flow
PlusVibe webhook fires (instant)
↓
Classify with Ollama/Claude
↓
Check campaign config: requireDemoSite?
├── YES → Queue website-generate → Queue post-demo-reply (90s delay)
└── NO → Generate reply immediately → Send via PlusVibe
↓
Telegram notify Mike on interested/meeting/question
↓
Log everything to email_replies table
Per-Campaign Config Location
lead-machine/campaigns/insurance-agencies.json→replyHandling.classificationslead-machine/campaigns/saa-6offers.json→replyHandling.classifications- Editable in Paperclip: Campaigns → Reply Config tab
What This Agent Does NOT Do
- Does NOT send replies for interested leads without a demo site
- Does NOT delete blacklist entries ever
- Does NOT auto-enable warmup or sending on PlusVibe accounts
- Does NOT upload to PlusVibe without full verification