Skip to content

yheshamx/bison-reply-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bison Reply Bot

A plug-and-play AI reply assistant for agencies running cold email on EmailBison. When a prospect replies to a campaign, the bot classifies the reply, drafts a response grounded in that client's own context file, and posts it as an interactive card in that client's Slack channel. A human reviews the draft and clicks Send, Edit, or Skip. That is the guarantee this repo is built around: nothing is ever emailed without a person clicking Send. It is a simplified, de-branded port of a production bot an in-house team runs at scale.

How it works

prospect replies to a campaign email
        |
        v
EmailBison webhook (lead_replied)
        |
        v
n8n reply workflow (one per client)
  junk filter -> fetch thread -> LLM drafts a reply
        |
        v
Slack card in the client's channel
  [ Send ] [ Edit ] [ Skip ]
        |
        v   human clicks Send
n8n shared interactivity workflow
        |
        v
reply goes out through EmailBison
(threaded, from the original sending mailbox)
  • EmailBison fires a lead_replied webhook to that client's n8n workflow the moment a prospect replies.
  • A junk filter drops auto-replies, out-of-office notices, bounces, and unsubscribes before anyone sees them.
  • The workflow pulls the conversation thread, then an LLM drafts a reply and tags the intent (interested, info request, cost objection, not interested, and so on).
  • The draft lands as a card in the client's Slack channel with Send, Edit, and Skip buttons.
  • One shared workflow handles every button click. Send posts the reply back through EmailBison, threaded, from the mailbox that sent the original email. Edit opens a pre-filled modal so you can adjust the text first. Skip removes the buttons and marks the card skipped.
  • The card then updates in place: buttons removed, a status line shows who acted. If EmailBison rejects a send, the card says so plainly. Nothing retries silently.

Per-client isolation: each client gets their own n8n workflow, their own Slack channel, and their own EmailBison workspace token. One Slack app and one shared interactivity workflow serve all clients.

What you need

  • An EmailBison instance, plus an API token for each client's workspace
  • Admin access to a Slack workspace (to create the app and the channels)
  • An n8n instance reachable over public HTTPS: n8n Cloud, or self-hosted on a VPS
  • An LLM API key: OpenRouter or Anthropic
  • Python 3.8 or newer (standard library only, no packages to install)
  • git (optional: downloading the repo as a zip works too)
  • Recommended: Claude Code, for a guided setup

Quick start

The easiest path: clone the repo, open it in Claude Code, and say "set me up". The bundled CLAUDE.md walks Claude through the whole setup with you, step by step.

Prefer to do it by hand? SETUP.md has every step. The skeleton looks like this (on Windows, copy the files in Explorer instead of cp):

cp agency.conf.example agency.conf        # add your Slack token, team ID and LLM key
cp -r clients/_template clients/acme      # one folder per client
# edit clients/acme/client.conf and clients/acme/context.md
python scripts/make_client.py acme        # builds import-ready n8n workflows

Then import the generated files from build/ into n8n, register the webhook in EmailBison, and run an end-to-end test. SETUP.md covers each of those.

Repo map

README.md                     you are here
SETUP.md                      full manual setup guide
CLAUDE.md                     instructions that let Claude Code run the setup for you
docs/
  BISON_NOTES.md              EmailBison API notes and gotchas
  SLACK_CONNECT.md            sharing a channel with your client's Slack workspace
  TROUBLESHOOTING.md          common problems and fixes
workflows/
  reply-handler.template.json          per-client n8n workflow template
  slack-interactivity.template.json    shared button-handling workflow template
prompts/
  system_prompt.md            drafting prompt scaffold (client name + context slots)
scripts/
  make_client.py              builds import-ready workflows from templates + configs
  dev_regen_templates.py      maintainer tool, regenerates the templates
slack/
  app-manifest.json           Slack app manifest (create the app "From a manifest")
agency.conf.example           copy to agency.conf (gitignored): Slack + LLM settings
clients/
  _template/                  copy to clients/<slug>/: client.conf + context.md
  example-inc/                a filled, fictional example you can dry-run
build/                        (gitignored) output of make_client.py

The Slack card

Every prospect reply becomes one card. It shows who wrote in, what they said, and a ready-to-send draft:

From: Jane Doe <jane@prospectco.com>
Subject: Re: quick question about shipping

> Thanks for reaching out. Can you tell me more
> about pricing and how onboarding works?

Suggested reply:
Happy to. Pricing depends on volume, so the most useful
thing I can do is put your real numbers side by side.

Which channels are you selling on today?

Best,
Sam

Intent: info_request

[ ✅ Send ]   [ ✏️ Edit ]   [ ⏭️ Skip ]

After a click, the buttons disappear and a status line takes their place, for example "Sent by @sam".

Read next

FAQ

Does it ever send anything on its own? No. Every outgoing email requires a human clicking Send. Auto-replies, out-of-office notices, bounces, and unsubscribes are filtered out before they even reach Slack, and nothing in the pipeline can email a prospect without a click.

Do I need one Slack app per client? No. One Slack app serves all your clients. Each client gets their own channel, and one shared workflow routes every button click to the right client's EmailBison workspace.

What do clients see? Only their own channel. Each client's replies, drafts, and buttons live in a channel dedicated to them. Nothing crosses between clients.

Can my clients click Send themselves? Yes. Share the channel with their team via Slack Connect and they can see the cards and use the buttons. See docs/SLACK_CONNECT.md, including one caveat to test about the Edit button for external members.

What does it cost to run? Two things bill you: your n8n hosting (an n8n Cloud subscription, or your own server) and your LLM usage, which scales with reply volume. Check the current pricing pages of n8n and your LLM provider for numbers.

About

AI reply bot for cold-email agencies on EmailBison: drafts replies with an LLM, a human approves in Slack (Send / Edit / Skip). Per-client instances, one Slack app, guided setup by Claude Code.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages