Cut toFrame 0304
CASE 07 · n8n + LLM · Outlook · Salesforce
Avalara legal inbox
Project detailsCase 07
- Client
- Avalara · via TrueHorizon
- Category
- n8n + LLM · Outlook · Salesforce
- Role
- Designed and built · via TrueHorizon for Avalara’s AI Centre of Excellence
- Stack
- Outlook · OpenAI · Salesforce · Gemini · n8n
Built byHarsh Agrawal
Impact
- 500+Legal-team hours saved a year on emails once read, sorted and forwarded by hand
- 4Manual steps per email taken off the Legal team: read, sort, look up in Salesforce, forward
- 10Categories from the legal team’s own routing rules, the riskier one chosen on any tie
- 100%Court and regulatory mail sent to a person, never answered by AI
The short version
Built as a contractor through TrueHorizon for Avalara. An n8n system that takes the first pass on the company’s legal inbox, the work a paralegal did by hand for tens of emails a day: read each one, sort it into one of ten categories from the legal team’s own rules, look the customer up in Salesforce and forward it to the account owner. No AI reply ever goes back on court or regulatory mail.
The brief
Avalara’s legal team shares one inbox for contract notices, legal claims, court and regulatory mail, and a long tail of routine notifications.
A paralegal read each email, decided which bucket it belonged in, looked the customer up in Salesforce to find the account owner, and wrote the forward by hand. The routing rules were already written down. The bottleneck was applying them one email at a time.
How it runs
- 01Intake
An Outlook trigger on the Legal mailbox. PDF attachments are read, and every email is stripped of HTML and noise before anything else sees it.
Outlook - 02Classify
A separate classifier workflow on OpenAI’s GPT-5.5 returns one of ten categories from the legal team’s rules. If two could fit, it must take the riskier one: a subpoena filed as spam is a missed court deadline.
OpenAI - 03Owner
For customer notices, GPT-5.5 pulls out the customer’s name and ignores Avalara’s own company names, Salesforce returns candidate accounts, and a second model picks the owner or abstains.
Salesforce - 04Act
Low-risk mail gets a fixed reply. Customer notices go to the account owner with a short summary written by Gemini. Court mail goes straight to the litigation paralegal and regulatory mail is flagged for a person, so no AI reply ever goes back to the sender.
Gemini - 05Mark
Every email gets an Outlook category: handled, needs a human, or no action. The legal team can check what the automation did without leaving Outlook.
Outlook
The result
Before this, a paralegal read every email in the shared inbox, decided which bucket it fell into, looked the customer up in Salesforce and wrote the forward by hand, tens of times a day. The system now takes that first pass, and a person only steps in where the rules say one must.
It ran on the live Legal inbox in two supervised phases, each followed by a written review from the Legal team. Almost every correction was about where one category ends and the next begins, not about the plumbing: a new category for requests that need someone to act but not legal, and a few routing exceptions.
Every change was tested before it went live. The classifier runs inside n8n’s evaluation framework against a labelled set of past Legal emails, so a prompt edit is scored on the whole set, not only on the email that prompted it. And every forward ends with one line: reply “This is not intended for me” and the email goes back to the legal team, because that phrase is itself one of the categories.
The proof





1 · 08Open caseNext case · 08 / 09
Oil & gas recruitment
Oil, gas & offshore recruiter · LinkedIn + email · Brazil, US, UAE
LinkedIn outreach for an oil, gas and offshore recruiter across Houston, Dubai and Brazil. One campaign, in Portuguese from the firm’s own Brazil lead, was accepted by 46.5% of the people it reached, 2.6 times the eight before it, and turned into 41 interested replies and 9 meetings or calls agreed.
CASE 07 · n8n + LLM · Outlook · Salesforce
Avalara legal inbox
Project detailsCase 07
- Client
- Avalara · via TrueHorizon
- Category
- n8n + LLM · Outlook · Salesforce
- Role
- Designed and built · via TrueHorizon for Avalara’s AI Centre of Excellence
- Stack
- Outlook · OpenAI · Salesforce · Gemini · n8n
Built byHarsh Agrawal
Impact
- 500+Legal-team hours saved a year on emails once read, sorted and forwarded by hand
- 4Manual steps per email taken off the Legal team: read, sort, look up in Salesforce, forward
- 10Categories from the legal team’s own routing rules, the riskier one chosen on any tie
- 100%Court and regulatory mail sent to a person, never answered by AI
The short version
Built as a contractor through TrueHorizon for Avalara. An n8n system that takes the first pass on the company’s legal inbox, the work a paralegal did by hand for tens of emails a day: read each one, sort it into one of ten categories from the legal team’s own rules, look the customer up in Salesforce and forward it to the account owner. No AI reply ever goes back on court or regulatory mail.
The brief
Avalara’s legal team shares one inbox for contract notices, legal claims, court and regulatory mail, and a long tail of routine notifications.
A paralegal read each email, decided which bucket it belonged in, looked the customer up in Salesforce to find the account owner, and wrote the forward by hand. The routing rules were already written down. The bottleneck was applying them one email at a time.
How it runs
- 01Intake
An Outlook trigger on the Legal mailbox. PDF attachments are read, and every email is stripped of HTML and noise before anything else sees it.
Outlook - 02Classify
A separate classifier workflow on OpenAI’s GPT-5.5 returns one of ten categories from the legal team’s rules. If two could fit, it must take the riskier one: a subpoena filed as spam is a missed court deadline.
OpenAI - 03Owner
For customer notices, GPT-5.5 pulls out the customer’s name and ignores Avalara’s own company names, Salesforce returns candidate accounts, and a second model picks the owner or abstains.
Salesforce - 04Act
Low-risk mail gets a fixed reply. Customer notices go to the account owner with a short summary written by Gemini. Court mail goes straight to the litigation paralegal and regulatory mail is flagged for a person, so no AI reply ever goes back to the sender.
Gemini - 05Mark
Every email gets an Outlook category: handled, needs a human, or no action. The legal team can check what the automation did without leaving Outlook.
Outlook
The result
Before this, a paralegal read every email in the shared inbox, decided which bucket it fell into, looked the customer up in Salesforce and wrote the forward by hand, tens of times a day. The system now takes that first pass, and a person only steps in where the rules say one must.
It ran on the live Legal inbox in two supervised phases, each followed by a written review from the Legal team. Almost every correction was about where one category ends and the next begins, not about the plumbing: a new category for requests that need someone to act but not legal, and a few routing exceptions.
Every change was tested before it went live. The classifier runs inside n8n’s evaluation framework against a labelled set of past Legal emails, so a prompt edit is scored on the whole set, not only on the email that prompted it. And every forward ends with one line: reply “This is not intended for me” and the email goes back to the legal team, because that phrase is itself one of the categories.
The proof





1 · 08Open caseNext case · 08 / 09
Oil & gas recruitment
Oil, gas & offshore recruiter · LinkedIn + email · Brazil, US, UAE
LinkedIn outreach for an oil, gas and offshore recruiter across Houston, Dubai and Brazil. One campaign, in Portuguese from the firm’s own Brazil lead, was accepted by 46.5% of the people it reached, 2.6 times the eight before it, and turned into 41 interested replies and 9 meetings or calls agreed.
CASE 07 · n8n + LLM · Outlook · Salesforce
Avalara legal inbox
Project detailsCase 07
- Client
- Avalara · via TrueHorizon
- Category
- n8n + LLM · Outlook · Salesforce
- Role
- Designed and built · via TrueHorizon for Avalara’s AI Centre of Excellence
- Stack
- Outlook · OpenAI · Salesforce · Gemini · n8n
Built byHarsh Agrawal
Impact
- 500+Legal-team hours saved a year on emails once read, sorted and forwarded by hand
- 4Manual steps per email taken off the Legal team: read, sort, look up in Salesforce, forward
- 10Categories from the legal team’s own routing rules, the riskier one chosen on any tie
- 100%Court and regulatory mail sent to a person, never answered by AI
The short version
Built as a contractor through TrueHorizon for Avalara. An n8n system that takes the first pass on the company’s legal inbox, the work a paralegal did by hand for tens of emails a day: read each one, sort it into one of ten categories from the legal team’s own rules, look the customer up in Salesforce and forward it to the account owner. No AI reply ever goes back on court or regulatory mail.
The brief
Avalara’s legal team shares one inbox for contract notices, legal claims, court and regulatory mail, and a long tail of routine notifications.
A paralegal read each email, decided which bucket it belonged in, looked the customer up in Salesforce to find the account owner, and wrote the forward by hand. The routing rules were already written down. The bottleneck was applying them one email at a time.
How it runs
- 01Intake
An Outlook trigger on the Legal mailbox. PDF attachments are read, and every email is stripped of HTML and noise before anything else sees it.
Outlook - 02Classify
A separate classifier workflow on OpenAI’s GPT-5.5 returns one of ten categories from the legal team’s rules. If two could fit, it must take the riskier one: a subpoena filed as spam is a missed court deadline.
OpenAI - 03Owner
For customer notices, GPT-5.5 pulls out the customer’s name and ignores Avalara’s own company names, Salesforce returns candidate accounts, and a second model picks the owner or abstains.
Salesforce - 04Act
Low-risk mail gets a fixed reply. Customer notices go to the account owner with a short summary written by Gemini. Court mail goes straight to the litigation paralegal and regulatory mail is flagged for a person, so no AI reply ever goes back to the sender.
Gemini - 05Mark
Every email gets an Outlook category: handled, needs a human, or no action. The legal team can check what the automation did without leaving Outlook.
Outlook
The result
Before this, a paralegal read every email in the shared inbox, decided which bucket it fell into, looked the customer up in Salesforce and wrote the forward by hand, tens of times a day. The system now takes that first pass, and a person only steps in where the rules say one must.
It ran on the live Legal inbox in two supervised phases, each followed by a written review from the Legal team. Almost every correction was about where one category ends and the next begins, not about the plumbing: a new category for requests that need someone to act but not legal, and a few routing exceptions.
Every change was tested before it went live. The classifier runs inside n8n’s evaluation framework against a labelled set of past Legal emails, so a prompt edit is scored on the whole set, not only on the email that prompted it. And every forward ends with one line: reply “This is not intended for me” and the email goes back to the legal team, because that phrase is itself one of the categories.
The proof





1 · 08Open caseNext case · 08 / 09
Oil & gas recruitment
Oil, gas & offshore recruiter · LinkedIn + email · Brazil, US, UAE
LinkedIn outreach for an oil, gas and offshore recruiter across Houston, Dubai and Brazil. One campaign, in Portuguese from the firm’s own Brazil lead, was accepted by 46.5% of the people it reached, 2.6 times the eight before it, and turned into 41 interested replies and 9 meetings or calls agreed.
Contact
Let’s talk.
Whether you’re building a team or a pipeline, one email is enough. I reply within a business day.
Contact
Let’s talk.
Whether you’re building a team or a pipeline, one email is enough. I reply within a business day.
Contact
Let’s talk.
Whether you’re building a team or a pipeline, one email is enough. I reply within a business day.
Harsh Agrawal
AI Automation & GTM Engineer
