WhatsApp Automation

Technical Implementation Summary and IT Server Requirements

This document explains the current WhatsApp Automation application, how it operates, what infrastructure it needs in production, and what dependencies IT must provide for reliable deployment and status tracking.

Prepared for PSI | Date: 2026-05-12

1) Solution Overview

The application receives BrightCall webhook events, detects unanswered AI call scenarios, and sends a follow-up WhatsApp template message through the Commbot API. It includes a desktop UI for operations, environment toggles, AUH vs Assets routing, project-level template mapping, persistent message reporting, CSV export, and automatic retry handling for temporary Commbot failures.

Current public webhook endpoint:
https://messages.ngrok.dev/path/to/api/callEnded

2) Technologies Used

Backend and API

Desktop Application

Network Exposure

3) Functional Flow

  1. BrightCall sends webhook events to the ngrok URL.
  2. ngrok forwards requests to the application server at http://localhost:3000.
  3. The application validates and parses the event, resolves the target environment, and selects the correct Commbot template.
  4. For eligible unanswered AI call cases, the application sends the Commbot template request. Optional repeat-follow-up and after-hours template overrides may apply.
  5. If Commbot is temporarily unavailable, the outbound message is queued and retried automatically.
  6. Message logs, counts, recent events, and discovered projects are available in the UI and debug endpoints.
  7. Persistent history and queued retries are reloaded after restart, so reporting survives application restarts on the same server disk.

4) APIs and Main Routes

5) Configuration Inputs (.env)

Important: Credentials should be treated as secrets and rotated according to internal policy.

6) IT Requirements for Always-On Server

Recommended Server Sizing (Production)

ItemRecommendedNotes
OSWindows Server 2019/2022 or Ubuntu 22.04 LTSCurrent packaged app is Windows-first, but the backend remains standard Node.js.
CPU2 vCPU minimum (4 vCPU preferred)Webhook load is light, but extra capacity improves resilience and monitoring headroom.
RAM4 GB minimum (8 GB preferred)Allows Node app, ngrok, monitoring, and background retry processing comfortably.
Disk20 GB free minimum, persistent disk requiredIncludes application files, logs, durable event history, retry queue, backups, and installers.
Node.jsNode 18 LTS or Node 20 LTSMatch enterprise standard and security patching cycle.

Network and Firewall Requirements

Service Persistence (Critical)

To keep the integration running 24/7, both the Node service and ngrok tunnel must auto-start after reboot and auto-recover on crash. The storage used by the application must also persist across restart and redeployment.

Commbot Status Tracking Requirement

If the business wants the app to show delivered, opened, and read status inside the message log, Commbot must expose that data to this application through webhook callbacks or an API endpoint the app can call.

Security and Compliance

7) What to Ask IT Team (Checklist)

RequestWhy it is needed
Provide an always-on VM/server with Node 18/20 installedRuns the webhook receiver continuously
Install ngrok and configure paid account tokenMaintains the fixed public URL for BrightCall webhooks
Allow outbound access to ngrok, BrightCall, and Commbot APIsRequired for webhook intake and message dispatch
Provide persistent disk storage for the application data folderKeeps message history, retry queue, and reporting after restart
Confirm whether Commbot exposes delivered, opened, and read events through webhook or APINeeded if the app should mirror the Commbot dashboard status lifecycle
Configure auto-start and auto-restart service policyEnsures no manual intervention after reboot or crash
Set up monitoring and alerting (service down, failed retries, failed webhooks)Early failure detection
Secure secret management for .env valuesProtects API keys and tokens
Define backup and rollback process for app updatesSafe release management

8) Operational Runbook (High Level)

  1. Deploy the latest build package to the server.
  2. Place approved .env values, including template routing and persistent storage settings, and verify NGROK_DOMAIN=messages.ngrok.dev.
  3. Start services (Node plus ngrok) through a managed service supervisor.
  4. Validate endpoints:
  5. Trigger a test webhook and confirm message log entries, retry behavior, and status updates in the UI.

9) Final Recommendation

For company-scale reliability, host this on a dedicated always-on server instead of a user laptop. Keep the ngrok reserved domain, use persistent server storage for the application data folder, apply service monitoring, and formalize secret management to ensure uninterrupted webhook processing and durable reporting.