Skip to content
Carlos Morais.
Work

Conversational AI startup

An AI omnichannel platform on WhatsApp

Companies connected their WhatsApp to the platform and gave it their business context. The AI answered those companies' customers, fetched data from external systems when needed, and the companies sent campaigns to thousands of contacts.

In 30 seconds

  • Full-stack at a startup whose AI answered other companies’ customers on WhatsApp.
  • I built the bulk campaign system from scratch (spreadsheet import, a BullMQ queue, status per contact) and maintained the message webhooks.
  • About 5 companies, ~100 conversations a day and peaks of 1,000 messages.
When
Apr 2025 — Jan 2026
Role
Software Developer · full-stack
Scale
~5 companies · ~100 interactions/day, peaks of 1,000
Stack
Next.js, React, NestJS, PostgreSQL, BullMQ, OpenAI, WhatsApp Cloud API

Context

A conversational AI startup selling automated customer service to other companies. The main channel was WhatsApp, through Meta's official API; there was also an in-house chat and a dashboard from which the client company's staff could talk to their own customers.

We served about five companies at a time, always with new proofs of concept in progress.

The problem

Each company has its own tone, rules and systems. The AI had to answer as that company, sometimes with data that only exists in its systems, like an order or an account, without exposing more to the model than needed.

And bulk campaigns on WhatsApp have their own rules: messages outside a conversation only through approved templates, the 24-hour window, sending limits, and each message's delivery status coming back later by webhook.

My part

I worked on both ends, frontend and backend, and took on DevOps problems when needed. When I joined, the WhatsApp integration was already being built: I maintained the webhooks and outgoing messages. The campaign system I built from scratch.

  • Campaigns: spreadsheet import, background bulk sending and per-contact delivery status.
  • Maintenance of the message webhooks and of replies sent over WhatsApp.
  • Work on the MCP servers connecting the AI to 10+ external APIs.
  • Support on the per-company configurable AI: customer service, lead generation and workflow automation.

Technical decisions

Everything starts with a webhook

Meta delivers every incoming message by webhook. The backend identifies the company, builds the reply with its context and answers through the official API. The AI took 10 seconds to a minute per reply.

A campaign is one long, paced job

The imported spreadsheet becomes a single queued job (BullMQ) with every recipient. It sends a few seconds apart, records each send in the database and moves on. Status webhooks later mark who got it and who didn't.

Marketing templates go out through Meta's Marketing Messages Lite API, built for this kind of send.

The 24-hour window in the database

Each contact's last interaction is recorded. Inside the window, replies are free-form; outside it, only templates, and a template reopens the window so the conversation can go on.

MCP as a separate service

When we started, MCP was still new and there were no ready-made servers for what we needed. For each external API, we studied its shape and wrote the tools in our own MCP service, on a separate server: the backend talks to it over the network, and each integration's logic stays out of the conversation engine.

The AI doesn't choose whose data it gets

Who's talking is already known from the WhatsApp number. The tools use that number, sent in headers, to fetch data from the APIs; the model gets only what it needs to answer, and sensitive data stays out of the prompt.

Architecture

Messages arrive from Meta by webhook and the conversation engine replies with the company's context, calling OpenAI and the MCP service, which runs on a separate server and talks to external APIs. Campaigns go through a BullMQ queue and out through Meta's marketing API.

Outcome

The platform served about five companies, with around 100 conversations a day in total and peaks of 1,000 messages. The campaign system I built from scratch went into use, letting companies send to whole contact lists.