Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

lucyw1234/whatsapp-ai-sales-mpesa

Domain:

digital infrastructure

Record type:

software
Creator:
luc
Host:
Autonomous AI Sales Agent for WhatsApp with real-time M-Pesa integration using n8n and Groq. WhatsApp AI Sales Engine (with Automated M-Pesa Checkout) Overview This project is an autonomous, AI-powered WhatsApp sales engine designed for retail and e-commerce businesses. It handles end-to-end customer conversion, from initial inquiry and stock verification to generating dynamic M-Pesa STK push prompts for immediate payment. Built for speed and execution, this architecture eliminates manual data entry, prevents lost sales from slow response times, and directly increases revenue through 24/7 intelligent automation. Core Architecture Front-End Interface: WhatsApp Business API Operations & Logic Engine: n8n (Workflow Automation) AI Brain: Mixtral 8x7b via Groq API (Agentic Intent Recognition & Tool Calling) Database & Inventory: Google Sheets Payment Gateway: Safaricom Daraja API (M-Pesa STK Push) Key Features Agentic Tool Execution: The AI is not a standard chatbot. It autonomously queries a live Google Sheet to verify stock levels and calculate dynamic pricing before confirming orders. Defensive Data Sanitization: Hardwired JavaScript/RegEx sanitization layers intercept AI outputs to ensure clean, API-compliant phone numbers and integer amounts before hitting the payment gateway. Global Error Handling: A dedicated catch-all workflow monitors the entire workspace. If an external API times out, it triggers an instant Telegram alert to the system admin with diagnostic data. Escalation Protocol (Human-In-The-Loop): The AI is constrained by strict prompt rules. If a customer requests wholesale pricing, complains, or hits an edge case, the system freezes the AI, sends a polite hold message, and instantly notifies the business owner to take over the chat. Workflow Execution Flow Trigger: Customer sends a WhatsApp message. Processing: n8n routes the message to the AI Agent. Memory: Window Buffer Memory provides conversation context. Tool Access: * Check_Stock: Reads inventory and pricing. Initiate_Payment: Sub-workflow that formats data and pushes the M …

Visit

github.com

Languages

Lusengo

Tags

aiai-agentsai-automationgroqmpesa-darajan8nwhatsapp-business-api

Similar

Mtemi/Whatsapp-Business-Bot-with-MPESA-Integration-cleven12/personal-whatsapp-aidevsettingz/whatsapp-ai-demoAniseth/swahili-sales-aidust-dr/whatsapp-ai-assistantmfinangaramadhan1996-png/whatsapp-ai-bot

Mtemi/Whatsapp-Business-Bot-with-MPESA-Integration-

A WhatsApp Chat chat bot that can pay bills via MPESA API and manage chats via Twillio API. Can be e

cleven12/personal-whatsapp-ai

📱 Flask-based WhatsApp AI | Google Gemini (1.5/2.0) | Multi-key Fallback | Persistent JSON Memory |

devsettingz/whatsapp-ai-demo

Conversational AI agent for African businesses — supports WhatsApp, web chat, bookings, and service

Aniseth/swahili-sales-ai

dust-dr/whatsapp-ai-assistant

AI-powered WhatsApp Sales Assistant for African SMEs

mfinangaramadhan1996-png/whatsapp-ai-bot

Bot ya WhatsApp inayojibu meseji za wateja kwa Kiswahili # WhatsApp AI Bot (Kiswahili) — Starter Pr