Cut lead-email AI costs 90% in an n8n Pipedrive workflow

A freelancer reworked a property manager's n8n lead pipeline to use regex for form emails and trimmed HTML for LLM parsing, cutting AI…

Used for
Work
Skill needed
Low code
Shown in video
Partial demo
Summary based on
Transcript
Code, Integration & APIWatch on YouTube

I Cut My Client's AI Cost by 90% (Real n8n Case Study)

Published Nov 23, 20266:35178 views3 likes

Key moments

  • 1:16First version sends every email to the AI node
  • 2:18Form leads switched to regex, no AI
  • 3:20HTML converted to Markdown to shrink tokens
  • 5:11Annual AI cost drops about 90%

What they made

AI cost for 3,000 monthly lead emails dropped about 90%, e.g. Claude Sonnet from ~$750 to ~$57 per year; tokens per raw email fell from 8,000+ to ~1,100.

~90% lower AI cost; ~87% fewer tokens per email

5:11

How they did it

  1. Human0:00

    Client asked for all lead emails from forms, landing pages and direct emails to become Pipedrive deals with contacts and companies.

    Stated in video
  2. AI1:16

    Initial n8n workflow used the AI node to parse every email into structured data and create Pipedrive deals.

    Stated in video · n8n
  3. Human1:48

    Reviewed sample emails from each source and found form-submitted leads always follow the same pattern.

    Stated in video
  4. AI + human2:18

    Replaced AI with regex in a Code node for form leads, keeping the LLM only for free-text customer emails.

    Stated in video · n8n
  5. AI3:20

    Converted raw HTML emails to Markdown and stripped header and footer to keep only the main body before sending to the LLM.

    Stated in video · n8n
  6. Human4:09

    Recalculated token counts and annual API costs across Claude Sonnet, GPT-4 mini and Gemini Flash.

    Stated in video

What you can reuse

  • Route fixed-pattern inputs through code and reserve the LLM for free-text cases a human would otherwise read.
  • Strip HTML to Markdown and keep only the email body to cut token counts by roughly 87%.
  • API tokens are billed separately from chat subscriptions, so cost per email matters at volume.

Trade-offs

  • Cost figures are list-price estimates for 3,000 monthly leads, not measured invoices.
  • The creator re-recorded the token numbers after mixing them up earlier.
  • No live run or Pipedrive output is shown; the workflow is explained from the transcript.

AI-generated case summaries can contain mistakes. Report an error

Related cases