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.
8
2 comments
Shihab Sakif
7
Built a RAG-powered intake chatbot for PI law firms. Here's the full breakdown ๐Ÿ‘‡
AI Automation Society
skool.com/ai-automation-society
Learn to get paid for AI solutions, regardless of your background.
Leaderboard (30-day)
1
+7866
2
+7601
4
+4289
5
+4056
Powered by