Custom WhatsApp CRM (Based on WhatsCRM) with n8n Workflows + AI/RAG

Job ID: 39790321

Budget: $250 – $750 USD

Objective

I want to start with WhatsCRM (a Codecanyon script, a SaaS system that already includes WhatsApp Cloud API integration, chatbot flow builder, broadcasting, inbox, ticketing, and API access). I need it customized and extended to:

1. Replace the built-in workflow engine with n8n in the background, so flows are easier to extend with new steps/actions.


2. Add a dedicated AI & Knowledge Base module (multi-LLM integration + RAG).


3. Customize the design/theme so it looks different and original (not the stock WhatsCRM look).




---

Current Base System (WhatsCRM)

WhatsCRM already includes:

Multi-tenant SaaS (Admin, User, Agent panels).

WhatsApp Cloud API integration.

Ticket & chat management.

Drag & Drop Chatbot Flow Builder.

Broadcasting with tracking.

API access for integration.

Plan management, subscriptions, user dashboards.

Built with Node.js backend + MySQL and React frontend.



---

Customization Required

1. Workflow Execution via n8n

The Flow Builder UI remains for clients.

When a flow is published, it should be compiled to our DSL → n8n JSON and deployed into n8n (using REST API).

WhatsApp incoming messages → routed by our backend → sent to the correct n8n webhook for execution.

Conversation state is stored in our DB (not in n8n).

Supported flow nodes in Phase 1:

Send message (template or free text).

Interactive buttons (Yes/No, lists).

Collect structured data (name, phone, address).

Branch/conditions (based on input).

Book appointment (via Google Calendar).

AI reply (call AI model).

Call API (generic HTTP).




---

2. AI & RAG Module

Admin panel: add OpenAI, Gemini, DeepSeek API keys.

Client panel:

Choose which model to use.

Upload knowledge files (PDF, DOCX, TXT, CSV).

System stores embeddings in vector DB (pgvector/Qdrant).

Write “system prompts” for their AI agent.


AI features available inside flows:

AI reply node (use chosen model, with or without RAG).

Classify intent node (branch workflow).

RAG search node (retrieve relevant KB chunks).


Track token usage and AI cost per tenant for billing.



---

3. Google Calendar Integration

OAuth connection for each tenant.

API endpoints:

/calendar/freebusy – check availability.

/calendar/book – create booking.


Workflow “Book appointment” node should automatically add an event to the client’s Google Calendar.



---

4. Design & Theming

Full UI theme redesign (colors, typography, spacing) to look original.

Re-style Flow Builder nodes with custom icons.

Update dashboards (Admin, User, Agent) with new design.

Landing page and login screens customized.



---

Technical Requirements

Base system: WhatsCRM (Node.js backend, React frontend, MySQL).

New services/modules:

flows-compiler → DSL to n8n JSON.

router → handle WhatsApp inbound events, map to workflows.

ai-proxy → AI model manager + RAG pipeline.

kb-indexer → file ingestion, chunking, embedding storage.

calendar → Google OAuth + booking.


Queue system (Redis/bullmq) for retries, rate-limits, and async jobs.

File storage: S3/MinIO for knowledge files.

Secrets management: encrypted API keys and OAuth tokens.



---

Deliverables

1. Modified WhatsCRM codebase with:

Workflow execution using n8n.

AI & Knowledge Base module (Admin + Client dashboards).

Google Calendar integration.

New theme design.



2. Docker-compose for local/staging setup.


3. Documentation: how to deploy, add n8n, connect models, manage flows.


4. Sample flow DSL + generated n8n JSON.




---

Acceptance Criteria

Creating a flow in UI → publishing → n8n workflow is created/activated.

WhatsApp messages follow the n8n-defined flow.

AI reply works with chosen model (OpenAI, Gemini, DeepSeek).

RAG answers from uploaded PDFs/DOCX.

Booking node successfully creates Google Calendar events.

UI looks original (not like stock WhatsCRM).



---

Skills Required

Node.js (Express/NestJS).

React/Next.js.

MySQL + Postgres/pgvector or Qdrant.

WhatsApp Cloud API.

n8n automation (REST API integration).

OpenAI/Gemini/DeepSeek APIs.

SaaS multi-tenancy & OAuth.

UI/UX design (theming + dashboards).



---

Notes

WhatsCRM already has a stable base with SaaS features.

Your work is to replace the flow engine, add AI & Calendar modules, and redesign UI.

Must keep code modular so future WhatsCRM updates can be merged.