What this workflow does
- Intake form (Webhook) receives the inquiry: contact details, other parties, matter type, key dates, a description and whether the non-engagement notice was acknowledged.
- Validate intake and build prompt (Code) checks required fields and the notice acknowledgment, then builds a Messages API request with a strict JSON schema.
- Intake complete? (If) sends incomplete intakes, including any without the notice acknowledgment, to the exceptions channel.
- Claude: summarize and extract parties (HTTP Request) returns a two-sentence neutral summary, a practice area, any deadline mentioned, and every named person and organization with a role. The prompt tells the model not to assess the merits.
- Build conflict search terms (Code) parses the response, handles
refusalandmax_tokens, merges in the names typed on the form, and creates search variants: business suffixes stripped, common nicknames, and last name only (flagged as a weak match). If extraction fails, it still searches every name from the form. - Conflict check (placeholder): search PMS (HTTP Request) searches your practice management contacts for each variant. It is set up for Clio’s contacts endpoint. A failed search is carried forward, not dropped.
- Build conflict hit list (Code) combines results into one card with the summary, a deadline warning, strong and weak matches, and any search that failed.
- Teams: attorney clears conflicts sends the card to a Teams chat with Conflicts cleared and Decline buttons and waits up to 72 hours.
- Decision (Switch) sends the scheduling link, sends a polite decline that encourages the person to contact another attorney promptly, or flags a missing decision in the exceptions channel.
Before you import
- n8n 1.x. Many firms self-host so prospect data stays on infrastructure they control.
- An Anthropic API key. API data is not used for training by default, but confirm this fits your confidentiality policy.
- API access to your practice management system. For Clio, register an API app and create a generic OAuth2 credential in n8n.
- Microsoft Teams and Gmail OAuth2 credentials.
Setup
- Import the JSON and attach credentials on the Claude, conflict check, Teams and Gmail nodes.
- Map your form fields to
name,email,phone,other_parties,matter_type,key_dates,description,referral_sourceandnotice_acknowledged. - On the conflict check node, keep the Clio URL or replace it with your system’s search endpoint, then adjust the parsing in Build conflict hit list. Extend it to search matters and adverse parties, not only contacts.
- Replace
REPLACE_WITH_TEAMS_CHAT_ID,REPLACE_WITH_TEAMS_TEAM_ID,REPLACE_WITH_TEAMS_CHANNEL_ID,REPLACE_WITH_SCHEDULING_LINKandREPLACE_WITH_FIRM_NAME. - Have the managing partner approve both email texts.
Test it
Submit an intake that names a person and a company already in your system as a former client. Confirm both show up as strong hits and that the deadline warning appears for a date inside two weeks. Submit one without the notice checkbox and confirm it lands in exceptions. Click Decline on a test card and check the email.
Make it production-ready
- This step supports, but does not replace, your firm’s conflict procedure and professional responsibility rules. Keep a person as the decision-maker.
- Write every decision, reviewer name and hit list to your practice management system or a log for audit.
- Add an error workflow so a failed Teams or Gmail call alerts the intake coordinator.
- Searches run once per name variant. Watch your practice management API rate limits on intakes with many parties.
claude-haiku-5-5is cheaper, but long stories with many parties benefit from the stronger model.
Read the full guide at How to automate client intake for law firms, or talk to us about connecting it to your practice management system.