How mubashir-786/n8n-whatsapp-automation works
This is a WhatsApp ordering service backed by an Express API, SQLite, and an optional n8n workflow. Customers send menu, order, confirmation, and tracking messages through WhatsApp; the webhook hands messages to the processor, which looks up products or orders, persists customer and order state, and sends replies. Separate API routes provide customer and order administration, while the README documents additional n8n menu, parser, creator, tracker, and response workflow capabilities. The workflow JSON and public page were not sampled, so their internal connections are not asserted.
Main entry points: orders.db SQLite records · webhook.js Message webhook · orderProcessor.js Message processor · server.js HTTP server
Components 12
Message ingress
- HTTP server
server.js - Message webhook
routes/webhook.js - n8n webhook service
routes/webhook.js
Order lifecycle
- Message processor
services/orderProcessor.js - Menu delivery
services/whatsappService.js
Management API
- Order endpoints
routes/orders.js - Customer endpoints
routes/customers.js
Persistence and integrations
- SQLite initialization
database/init.js - SQLite records
database/orders.db
Other components
- WhatsApp customer
- WhatsApp Business API
- n8n workflow
n8n-workflows/whatsapp-order-automation.json
Connections 18
- WhatsApp customer → WhatsApp Business API: sends messages
README.md - WhatsApp Business API → Message webhook: posts messages
README.md - HTTP server → Message webhook: mounts route
server.js - Message webhook → Message processor: processes message
routes/webhook.js - Message webhook → SQLite records: records inbound
routes/webhook.js - Message processor → Menu delivery: requests menu
services/orderProcessor.js - Menu delivery → SQLite records: reads products
services/whatsappService.js - Message processor → SQLite records: reads and writes
services/orderProcessor.js - Message processor → WhatsApp Business API: sends replies
services/orderProcessor.js - Menu delivery → WhatsApp Business API: sends menu
services/whatsappService.js - HTTP server → Order endpoints: mounts route
server.js - HTTP server → Customer endpoints: mounts route
server.js - Order endpoints → SQLite records: reads and writes
routes/orders.js - Customer endpoints → SQLite records: reads and writes
routes/customers.js - SQLite initialization → SQLite records: initializes schema
database/init.js - Message webhook → n8n webhook service: triggers optionally
routes/webhook.js - n8n webhook service → n8n workflow: posts event
routes/webhook.js - n8n workflow → WhatsApp Business API: sends responses
README.md