Skip to main content
← Back to Open source
01Open-source build

Captain Patch

A self-hosted WhatsApp group assistant that turns mentions into answers, briefs, and Notion task updates.

sagnik11/dia-whatsapp-bot
01
01WhatsApp mention
02Policy checks
03Assistant tools
04Reply or Notion task
TypeScriptMIT

The reason for the build

Team decisions often disappear inside a busy WhatsApp thread. Captain Patch gives the group one named assistant that can summarize a discussion, search for context, and write the resulting work into Notion.

How the pieces connect

A mention enters through whatsapp-web.js and passes through sender and group policy checks. The assistant routes the request to conversation, file, voice, web-search, or Notion tools, then returns the response to the same group.

What the project handles

01

Conversation-aware replies

The bot uses bounded group context to summarize decisions and answer follow-up questions without reading an unlimited chat history.

02

Notion operations

Authorized founders can create tasks, inspect due work, add comments, and attach files from the group conversation.

03

Voice and file input

The assistant can process voice notes, screenshots, and shared files before deciding which tool should handle the request.

04

Replaceable personality

One configuration file holds the mascot voice and company context, so another team can adapt the bot without rewriting its core.

Constraints that shaped it

01

Founder-only commands and explicit sender allowlists keep write actions away from untrusted group members.

02

The project uses an unofficial WhatsApp Web automation layer, so deployments should use a dedicated account and account for protocol changes.

  • TypeScript
  • Node.js 24
  • whatsapp-web.js
  • OpenAI
  • Notion
  • Docker

Read the code, issues, and decisions in context.

Open on GitHub