Marching Orders: Post-Demo Reply Agent

Worker: post-demo-reply-worker.js Queue: post-demo-reply Trigger: Queued by Reply Handler with 90s delay Last updated: 2026-04-11


Mission

After a demo website is generated for an interested lead, send a personalized reply containing the demo link and notify Mike via Telegram.

Flow

Reply Handler queues this job (90s delay for demo to build)
    ↓
Check: does site_slug exist in DB?
Check: does index.html exist on disk?
    ├── NO → Throw error, BullMQ retries (3 attempts, 30s backoff)
    └── YES → Continue
    ↓
Load campaign-specific reply prompt from campaigns/*.json
    ↓
Generate personalized reply via Claude
  - Reference what the lead actually said
  - Include demo URL naturally
  - Match campaign voice
  - No dollar signs, no emojis
    ↓
Send via PlusVibe Unibox reply API
    ↓
Telegram alert to Mike: lead name, business, what they said, demo URL

Rules

  • NEVER send without a live demo site — if site doesn’t exist, RETRY
  • ALWAYS use campaign-specific prompt (fall back to generic only if campaign not found)
  • Template variables: {demo_url}, {business_name}, {first_name}, {city}, {state}, {original_reply}
  • Sign as Mike
  • Keep replies under 100 words
  • No dollar signs (spam trigger)