Built a RAG-powered intake chatbot for PI law firms. Here's the full breakdown ๐Ÿ‘‡
What it does for the firm:
Visitor lands on the site, describes their injury, bot qualifies them, sends them a confirmation email + SMS, pings the attorney on Slack, and logs the lead to Google Sheets. Zero human involvement until the attorney shows up for the call.
How it's built (n8n):
Workflow 1 โ€” Ingestion
Schedule Trigger โ†’ DELETE old vectors โ†’ scrape website โ†’ extract HTML โ†’ chunk with Character Text Splitter โ†’ embed with Mistral โ†’ store in Supabase
Workflow 2 โ€” Chat
Chat Webhook โ†’ AI Agent โ†’ Respond to Webhook
Agent tools: Supabase Knowledge Base, Google Sheets, Gmail, SMS, Slack
Memory: Window Buffer Memory (keeps conversation context)
A fix worth mentioning:
First version was stacking duplicate vectors every time the ingestion ran. Added a DELETE call before re-ingestion โ€” wipes the old data, rebuilds clean every time.
Stack:
n8n ยท Mistral ยท Supabase ยท Google Sheets ยท Gmail ยท Twilio ยท Slack
This is a demo but the whole thing is deployable as-is. Would love feedback โ€” especially if anyone's built something similar for legal.
7
4 comments
Shihab Sakif
4
Built a RAG-powered intake chatbot for PI law firms. Here's the full breakdown ๐Ÿ‘‡
AI Automation Agency Hub
skool.com/learn-ai
Start & Scale your own AI Automation Agency. Learn to build AI solutions, land clients & get paid. From the creators of the AAA business model.
Leaderboard (30-day)
Powered by