A chat bubble, a shared inbox and email replies for a single website is a weekend: a widget script, a WebSocket server, an agent page and SMTP plus IMAP for the email side. Past that the gaps are real: inbound mail that threads correctly, spam, WhatsApp and SMS carriers, and the resolution rate of Fin, which depends on retrieval tuning and testing a prompt won't match. Chatwoot already covers chat plus inbox as free software, so build your own only if you want something much smaller.
Before you buildIntercom has no free plan, only a 14-day trial. Chatwoot already does chat and inbox for free: build only if you want something smaller than it.
Build me a small support chat and inbox to replace Intercom. Requirements: - Node.js 22 + TypeScript: a Fastify server with `@fastify/websocket`, one SQLite file via better-sqlite3 at ./data/support.db, and a vanilla TypeScript widget bundled by esbuild into /widget.js. `npm start` serves http://localhost:4700. - Widget: one script tag (`<script src="https://HOST/widget.js" data-site="SITE_KEY">`) draws a chat bubble in a shadow DOM. The visitor gets a random id in localStorage, can leave an email, and sees the history after a reload. Follow prefers-color-scheme and stay under 30 KB gzipped. - Storage: sites (key, name, allowed origins, accent colour, office hours), visitors, conversations (open, snoozed, closed) and messages (author visitor, agent or system; body; created_at). Reject widget connections whose Origin is not in the site's allowed origins. - Inbox at /admin (one password in .env, signed cookie): conversation list with unread counts, live updates over WebSocket, reply box, canned replies from a Markdown file triggered by /shortcuts, internal notes, snooze, close and desktop notifications. - Email: when a visitor left an address and is offline, send the reply through nodemailer SMTP with the conversation id in the subject; poll an IMAP mailbox with `imapflow` every 60 seconds and add replies to the right conversation. Outside office hours show a configurable away note. - Help answers: index ./help/*.md with SQLite FTS5. For each new visitor message show the agent the 3 best-matching articles and, if LLM_BASE_URL is set in .env, a drafted reply (OpenAI-compatible; Ollama works). A draft is never sent without a click. - Safety: escape all message HTML, limit each visitor to 20 messages a minute and 2,000 characters per message, no file uploads. - One team, one agent login. No accounts, no telemetry. Outbound calls: SMTP, IMAP and the optional LLM endpoint. - Out of scope: WhatsApp, SMS, phone, tickets, workflows, product tours, reports, several agents. - README: embedding the widget, SPF and DKIM for the sending domain, and exposing the server over HTTPS.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Intercom.
Add Telegram notifications to the support chat in this folder. Requirements: - TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID in .env. Each new conversation and each visitor message posts a short message with the first 200 characters and a link to /admin. - Replying to that Telegram message sends the text to the visitor as an agent message. - Ignore messages from any chat id other than the configured one. - Out of scope: Telegram groups, buttons and media. - Update the README with how to create the bot.
Add visitor context to the support chat in this folder. Requirements: - The widget sends the current page URL, referrer and language with each conversation, shown in the inbox sidebar next to the visitor's history. - A logged-in user can be identified by a signed token from your server: `window.Support .identify(token)` where the token is an HMAC-SHA256 JWT with email and name, verified with IDENTITY_SECRET in .env. - Identified visitors merge with earlier anonymous conversations that used the same email. - Show country from the Cf-IPCountry header when present; store no IP addresses. - Update the README.
Add a contact importer to the support chat in this folder. Requirements: - A script `npm run import-contacts -- <file.csv>` that reads the CSV Intercom emails from Contacts > More > Export users. - Read the header, print the proposed mapping for name, email and created date, and ask for confirmation before writing anything. - Create visitors for rows with an email, skip duplicates, and print imported and skipped counts. - Update the README with the export steps and a reminder that the download link expires after one hour.
Add a small stats page to the support chat in this folder. Requirements: - A page at /admin/stats with conversations opened and closed per day for the last 30 days, median time to first reply and median time to close, computed in SQL. - Count office hours only when computing reply times. - A table of the 10 slowest conversations with links to them. - No chart libraries: plain SVG. - Update the README.
Support teams pay for one place where chat, email and the AI agent share a single conversation history, run by someone else. Fin is a draw for many, since its pricing charges only when it resolves a conversation.
Estimate · A $5 VPS carries one small site, plus a domain if you don't have one. Drafted answers add pennies per message through an API, or nothing with a local model. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Essential | $39 | $29 | Messenger live chat, shared inbox and ticketing, pre-built reports, public help center, basic automation; one full seat minimum. |
| Advanced | $99 | $85 | Workflow automation builder, multiple team inboxes, round-robin assignment, private and multilingual help center, 20 free Lite seats. |
| Expert | $139 | $132 | SSO and identity management, HIPAA support, SLAs, multibrand Messenger and help center, 50 free Lite seats. |
No free plan; a 14-day trial needs no credit card.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: WhatsApp, SMS, phone and social channels in the same inbox, Fin, an AI agent that resolves conversations without a person.
About $39 a month on the Essential plan per seat, $468 a year (checked 2026-10-14).
WhatsApp, SMS, phone and social channels in the same inbox; Fin, an AI agent that resolves conversations without a person; Workflows, round-robin assignment, SLAs and team inboxes; Proactive messages, product tours, surveys and banners; Reports on volume, response time and satisfaction; A hosted, multilingual help center. If any of those matter to you, keep paying.
Yes: Chatwoot (open source), FreeScout (open source), Zammad (open source).