All workCase 07 / 09

CASE 07 · n8n + LLM · Outlook · Salesforce

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 whole workflow in n8n, in eight labelled stages: intake, classify, route, account-owner lookup, direct routing, auto-replies, forward and send, and marking in Outlook.
Proof 01The whole workflow in n8n, in eight labelled stages: intake, classify, route, account-owner lookup, direct routing, auto-replies, forward and send, and marking in Outlook.

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.

01

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.

02

  1. 01
    Intake

    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
  2. 02
    Classify

    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
  3. 03
    Owner

    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
  4. 04
    Act

    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
  5. 05
    Mark

    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
03

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.

Intake and classification: attachments are checked and read, each email is cleaned, then it goes through the classifier and a ten-way router.
Proof 02Intake and classification: attachments are checked and read, each email is cleaned, then it goes through the classifier and a ten-way router.
The classifier is its own workflow with a second entry point for evaluation: the same prompt and model, scored against labelled historical emails.
Proof 03The classifier is its own workflow with a second entry point for evaluation: the same prompt and model, scored against labelled historical emails.
Customer notices: the business name is extracted, Salesforce is searched, and the result is routed by match confidence: explicit, strong, weak or none.
Proof 04Customer notices: the business name is extracted, Salesforce is searched, and the result is routed by match confidence: explicit, strong, weak or none.
The owner selector: an agent compares the extracted name with the Salesforce candidates and returns the account owner, or nothing if no match is good enough.
Proof 05The owner selector: an agent compares the extracted name with the Salesforce candidates and returns the account owner, or nothing if no match is good enough.
Forward and mark: an agent drafts the note to the account owner, it goes out with or without the original attachment, and the email is marked handled or sent for review.
Proof 06Forward and mark: an agent drafts the note to the account owner, it goes out with or without the original attachment, and the email is marked handled or sent for review.

Next 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.

All workCase 07 / 09

CASE 07 · n8n + LLM · Outlook · Salesforce

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 whole workflow in n8n, in eight labelled stages: intake, classify, route, account-owner lookup, direct routing, auto-replies, forward and send, and marking in Outlook.
Proof 01The whole workflow in n8n, in eight labelled stages: intake, classify, route, account-owner lookup, direct routing, auto-replies, forward and send, and marking in Outlook.

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.

01

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.

02

  1. 01
    Intake

    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
  2. 02
    Classify

    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
  3. 03
    Owner

    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
  4. 04
    Act

    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
  5. 05
    Mark

    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
03

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.

Intake and classification: attachments are checked and read, each email is cleaned, then it goes through the classifier and a ten-way router.
Proof 02Intake and classification: attachments are checked and read, each email is cleaned, then it goes through the classifier and a ten-way router.
The classifier is its own workflow with a second entry point for evaluation: the same prompt and model, scored against labelled historical emails.
Proof 03The classifier is its own workflow with a second entry point for evaluation: the same prompt and model, scored against labelled historical emails.
Customer notices: the business name is extracted, Salesforce is searched, and the result is routed by match confidence: explicit, strong, weak or none.
Proof 04Customer notices: the business name is extracted, Salesforce is searched, and the result is routed by match confidence: explicit, strong, weak or none.
The owner selector: an agent compares the extracted name with the Salesforce candidates and returns the account owner, or nothing if no match is good enough.
Proof 05The owner selector: an agent compares the extracted name with the Salesforce candidates and returns the account owner, or nothing if no match is good enough.
Forward and mark: an agent drafts the note to the account owner, it goes out with or without the original attachment, and the email is marked handled or sent for review.
Proof 06Forward and mark: an agent drafts the note to the account owner, it goes out with or without the original attachment, and the email is marked handled or sent for review.

Next 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.

All workCase 07 / 09

CASE 07 · n8n + LLM · Outlook · Salesforce

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 whole workflow in n8n, in eight labelled stages: intake, classify, route, account-owner lookup, direct routing, auto-replies, forward and send, and marking in Outlook.
Proof 01The whole workflow in n8n, in eight labelled stages: intake, classify, route, account-owner lookup, direct routing, auto-replies, forward and send, and marking in Outlook.

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.

01

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.

02

  1. 01
    Intake

    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
  2. 02
    Classify

    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
  3. 03
    Owner

    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
  4. 04
    Act

    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
  5. 05
    Mark

    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
03

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.

Intake and classification: attachments are checked and read, each email is cleaned, then it goes through the classifier and a ten-way router.
Proof 02Intake and classification: attachments are checked and read, each email is cleaned, then it goes through the classifier and a ten-way router.
The classifier is its own workflow with a second entry point for evaluation: the same prompt and model, scored against labelled historical emails.
Proof 03The classifier is its own workflow with a second entry point for evaluation: the same prompt and model, scored against labelled historical emails.
Customer notices: the business name is extracted, Salesforce is searched, and the result is routed by match confidence: explicit, strong, weak or none.
Proof 04Customer notices: the business name is extracted, Salesforce is searched, and the result is routed by match confidence: explicit, strong, weak or none.
The owner selector: an agent compares the extracted name with the Salesforce candidates and returns the account owner, or nothing if no match is good enough.
Proof 05The owner selector: an agent compares the extracted name with the Salesforce candidates and returns the account owner, or nothing if no match is good enough.
Forward and mark: an agent drafts the note to the account owner, it goes out with or without the original attachment, and the email is marked handled or sent for review.
Proof 06Forward and mark: an agent drafts the note to the account owner, it goes out with or without the original attachment, and the email is marked handled or sent for review.

Next 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

Whether you’re building a team or a pipeline, one email is enough. I reply within a business day.

Email me

Contact

Whether you’re building a team or a pipeline, one email is enough. I reply within a business day.

Email me

Contact

Whether you’re building a team or a pipeline, one email is enough. I reply within a business day.

Email me