A robust full-stack solution designed to capture, manage, and automate lead processing. This project integrates a React frontend with a Node.js backend and leverages n8n workflows for advanced automation tasks like data syncing (Google Sheets) and notifications (Discord & Email).
- Modern Frontend: Built with React (Vite) and styled with TailwindCSS v4 for a responsive, high-performance UI.
- Secure Backend: Node.js & Express REST API to handle lead submissions securely.
- Database Storage: MongoDB integration to persistently store every lead.
- n8n Automation: Seamless integration with n8n webhooks to trigger complex workflows instantly upon form submission.
- Type Safety: TypeScript support on the client-side for robust development.
- Framework: React (Vite)
- Language: TypeScript
- Styling: TailwindCSS v4
- HTTP Client: Axios
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB (Mongoose)
- Utilities: Dotenv, CORS, Axios
- Workflow Engine: n8n (Webhooks, Google Sheets, Discord & Email integration)
n8n-automated-lead-management-system/
├── client/ # Frontend application
│ ├── src/
│ │ ├── components/ # UI Components (e.g., LeadForm)
│ │ └── ...
│ └── ...
├── server/ # Backend API
│ ├── config/ # DB Configuration
│ ├── controllers/ # Request Logic
│ ├── models/ # Mongoose Schemas
│ ├── routes/ # API Routes
│ └── ...
└── README.md- Node.js installed on your machine.
- MongoDB instance (Local or Atlas).
- n8n instance (Self-hosted or Cloud).
git clone https://github.com/Rahul-R79/n8n-Automated-Lead-Management-System.git
cd n8n-Automated-Lead-Management-SystemNavigate to the server directory and install dependencies:
cd server
npm installCreate a .env file in the server directory:
PORT=8080
MONGO_URI=your_mongodb_connection_string
N8N_WEBHOOK_URL=your_n8n_webhook_urlStart the server:
npm run devOpen a new terminal, navigate to the client directory, and install dependencies:
cd client
npm installCreate a .env file in the client directory:
VITE_BACKEND_URL=http://localhost:8080Start the client (Vite):
npm run dev- Submission: The user fills out the lead form on the frontend.
- API Call: The data is sent to the Express backend (
/api/leads). - Persistence: The backend saves the lead to MongoDB.
- Automation: The backend triggers the configured n8n Webhook.
- Automation Workflow: n8n executes a powerful sequence:
- Google Sheets: Instantly records the lead details in a spreadsheet.
- Discord Alert: Sends a real-time notification to your team via a Discord bot.
- Email Response: Dispatches a personalized confirmation email to the user.
Thank you for checking out the n8n Automated Lead Management System! This project showcases the power of integrating custom code with automation platforms to streamline business processes.
Happy Coding! 🚀
