AI-Led Sales Automation Ecosystem Development n8n

Job ID: 40547963

Budget: $30 – $250 USD

Job Title
Build a Scalable n8n & AI Automation Ecosystem (Supabase + OpenAI + Wati) - Phased Project

Project Overview
We are looking for an expert Automation & AI Engineer to build a scalable, production-grade lead management and AI-driven conversational sales system. The system will ingest leads from 5 major ad networks, store them securely, initiate an intelligent WhatsApp AI Agent for qualification, and support seamless human handoff.

Important Note: We have a strict zero-tolerance policy for data loss or race conditions. This project will be executed in two clear milestones. We will fully test and stabilize the system using ONE platform first before expanding to the rest.

Technical Specifications
1. Database & Schema (Supabase)
Primary DB: Supabase or PostgreSQL (Google Sheets will NOT be used as the primary database).

Table Schema:
[id (UUID), created_at (Timestamp), lead_source (Text), full_name (Text), phone_number (Text), email (Text), target_course (Text), job_title (Text), company_name (Text), lead_status (Enum), ai_suspended (Boolean, default: false)]

Lead Status ENUM: Must strictly be: [Pending, Unresponsive, Info_Confirmed, Sales_Route, Closed_Won, Closed_Lost].

2. Core Logic & Guardrails (n8n & OpenAI)
AI API: OpenAI Chat Completions API (Do NOT use Assistants API).

The Gatekeeper Logic: The absolute first node after the WhatsApp inbound webhook must check if ai_suspended == true or lead_status == 'Sales_Route'. If true, the n8n execution thread must terminate instantly to prevent the AI from interfering with human agents.

Sequential Message Debouncing: Implement a 5-10 second debounce logic in n8n to aggregate consecutive messages from the same user into a single prompt for OpenAI.

Automated Timeout Cron: Set up an hourly Cron node in n8n to check for leads stuck in the Pending state for more than 24 hours (with no replies) and bulk-update their status to Unresponsive.

Data Mirroring: n8n must sync database updates to a Master Google Sheet solely for the sales team's visual tracking and color-coding.

Project Execution & Milestones
[Milestone 1] - Core Engine & Meta Ads Validation (50% of Budget)
You will build the entire database infrastructure, core AI logic, WhatsApp integrations, and security guardrails, but connect it ONLY to Meta Ads (Facebook/Instagram Lead Forms) for initial deployment and debugging.

Deliverables for Milestone 1:

Fully functional n8n JSON workflow blueprint.

Live test proving: Meta Lead Ingestion ➔ Supabase Write ➔ WhatsApp Message Delivered in under 15 seconds.

Live proof of the Gatekeeper logic (AI instantly stops responding when ai_suspended is flipped to true).

Proof of the Cron-based Unresponsive state update.

[Milestone 2] - Multi-Platform Expansion (50% of Budget)
Once Milestone 1 is verified as 100% bug-free and stable, you will replicate the webhook ingestion logic to feed the remaining 4 platforms into the exact same core engine:

Google Ads Lead Forms

TikTok Ads Lead Generation

Snapchat Lead Ads

LinkedIn Lead Gen Forms

Out of Scope (Deferred to Future Project)
Automated lead distribution/routing to specific human sales agents.

Sales agent performance tracking or commission analytics.

Required Skills
Advanced expertise in n8n (workflows, conditional logic, HTTP nodes).

Strong experience with Supabase / PostgreSQL relational databases.

Deep understanding of OpenAI API (Chat Completions, System Prompts, Token Trimming).

Hands-on experience with Wati API (WhatsApp Business API).

How to Apply: Please share a brief description or a short video (e.g., Loom) of a production-grade n8n + AI project you have built. Generic, AI-generated copy-paste proposals will be rejected immediately.