WhatsApp Automation Platform

by: Tomás Ospina.

Overview

Two complementary systems built around WhatsApp as an operational channel: an ingestion service that parses incoming messages into a database with a dashboard on top, and a bulk sender that delivers messages and media to a contact list with retries.

Round trip: submitted info from WhatsApp, webhook to the server, parsed into the database, confirmation back to the sender

Every message makes a full round trip — submitted, parsed, stored, confirmed — so the person on the other end knows immediately whether their entry was accepted.

Ingestion pipeline and bulk-sending pipeline

Ingestion & operations — WhatsAppServer

A Flask service receives messages through a webhook (both the WhatsApp Business API and an Android relay endpoint), runs them through a parser that validates the expected format, and stores the structured record in SQLite. Malformed messages get an immediate correction reply instead of silently disappearing.

On top of that sits a dashboard with session-based login, per-period metrics, CSV export and PDF report generation — so the people entering data over WhatsApp and the people reading the results never touch the database directly.

Bulk sending — whatsapp-sender

A Node.js service built on whatsapp-web.js with LocalAuth session persistence: it reads the contact list from SQLite, sends text and media (PDF, video) to each contact, and wraps every send in a retry helper so a dropped connection does not lose a recipient.

Technical Specifications

| Component | Stack | | —————- | ——————————————————— | | Webhook / API | Python, Flask — WhatsApp Business API + Android relay | | Parsing | Format validation with an error reply path | | Storage | SQLite (mensajes.db, contactos.db) | | Dashboard | Flask, authenticated sessions, CSV export, PDF reports | | Sender | Node.js, whatsapp-web.js, LocalAuth, headless Puppeteer | | Deployment | Linux server, environment-based configuration |

My Role & Key Contributions

What I Learned

Validating at the edge — replying “formato incorrecto” the moment a message arrives — removed almost all of the data cleanup that would otherwise have happened downstream.


🔒 Private repository — happy to walk through the code on request.