Skip to content

About

AI-powered CRM Lead Scoring and Workflow Automation using n8n, Ollama, Docker, MySQL, and PHP REST API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

🤖 AI CRM Automation

AI-powered CRM Lead Scoring & Workflow Automation using n8n, Ollama, MySQL, Docker, and PHP REST API.

AI CRM Automation


📖 Overview

AI CRM Automation is a workflow automation project that automatically analyzes incoming CRM leads using a local Large Language Model (LLM).

Instead of manually reviewing every lead, the workflow sends customer information to Ollama (Dolphin Llama 3), generates an AI-based lead score, assigns a priority level, determines the qualification status, and stores the results back into MySQL.

The entire process is orchestrated by n8n and runs locally using Docker.


✨ Features

  • 🤖 AI-powered Lead Scoring
  • ⚡ Automated CRM Workflow
  • 🧠 Local LLM with Ollama
  • 🐬 MySQL Database Integration
  • 🔄 Loop Processing for Multiple Leads
  • 📝 AI-generated Qualification Reason
  • 📊 Automatic Priority Classification
  • 🐳 Docker Deployment
  • 🌐 REST API Communication
  • 🔒 Fully Local & Private

🏗 Architecture


🔄 Workflow

The workflow performs the following steps:

  1. Query unprocessed leads from MySQL
  2. Loop through each lead
  3. Send lead data to Ollama
  4. AI analyzes the lead
  5. Generate:
  • Score
  • Priority
  • Status
  • Reason
  1. Parse AI response
  2. Update MySQL
  3. Save activity log

🖼 Workflow Screenshot


🗄 Database

Before AI Analysis

Leads waiting for AI processing.


After AI Analysis

AI automatically updates:

  • Score
  • Priority
  • Status
  • AI Reason

🧠 AI Output Example

{
  "id": 2,
  "score": 85,
  "priority": "High",
  "status": "Qualified",
  "reason": "Interested in CRM automation and AI integration."
}

⚙ Technology Stack

Technology Purpose
n8n Workflow Automation
Ollama Local LLM
Dolphin Llama 3 AI Lead Analysis
Docker Containerization
MySQL Database
PHP REST API
JSON Data Exchange

📂 Project Structure

ai-crm-automation
│
├── docs
│   ├── architecture.png
│   ├── thumbnail.png
│   ├── workflow.png
│   ├── mysql-before.png
│   └── mysql-after.png
│
├── docker
├── mysql
├── php
├── workflows
│
├── docker-compose.yml
├── README.md
└── LICENSE

🚀 Installation

Clone Repository

git clone https://github.com/ibam28/ai-crm-automation.git

Start Docker

docker compose up -d

Import MySQL Database

source database.sql

Import n8n Workflow

Open n8n

Import:

workflows/ai-crm-automation.json

Run Ollama

ollama serve

Pull model

ollama pull dolphin-llama

About

AI-powered CRM Lead Scoring and Workflow Automation using n8n, Ollama, Docker, MySQL, and PHP REST API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages