"Built an AI email triage agent for insurance adjusters using n8n + Gemini — here's what I learned"
I'm not a developer. I don't own a laptop. I built this entirely on my phone.
The idea was simple: independent insurance adjusters get buried in claim emails every day — Urgent ones, Missing Documents, Status Inquiries — all mixed together. I wanted to build something that reads each new email automatically and sorts it into the right label in Gmail without anyone touching it.
Here's the stack I landed on:
n8n Cloud (free trial to build and test)
Gmail Trigger — polls every 10 minutes for unread emails
Google Gemini 2.5 Flash — classifies each email into one of 4 categories
Switch node — routes by category
Gmail Label nodes — applies the right label automatically
The hardest bug I hit: Gemini wraps its JSON response in markdown code fences (```json ... ```), which breaks standard JSON.parse() completely. Took me a while to figure out the fix was stripping those fences before parsing. Small thing, cost me hours.
Total cost to run it: $0. Gemini's free tier handles 1,500 requests a day which is way more than any inbox needs.
It's live and labeling emails automatically now. Whole thing took about a week building in spare time on mobile.
Happy to share the workflow breakdown or the exact prompt I used if anyone's curious.