Why I'm Moving My AI Logic Out of n8n (But Keeping It in the Loop)
How I transformed a clunky two-workflow plus Discord bot setup into something cleaner and easier to manage with Google's ADK, while still letting n8n shine where it's best - predictable orchestration.
How I turned a clunky two workflow plus Discord bot setup into something cleaner and easier to manage with Google's ADK, while still letting n8n shine where it's best.
TLDR
n8n is fantastic for predictable orchestration like Gmail triggers, filters, webhooks, and human in the loop steps. But it quickly becomes brittle once you start stuffing it with AI logic. I ran into prompt spaghetti, endless JSON digging, and painful debugging. My fix was to keep Gmail monitoring in n8n, move AI decisions into a Google ADK agent behind a FastAPI service, and handle approvals through an API endpoint on the same service where the agent lives. That meant no more Discord bot to maintain.
The Backstory: It Worked Until It Didn't
When I first tried n8n, I was hooked. Visual nodes, quick integrations, instant wins. My early experiment was an Airbnb replier that drafted guest responses. Here's how it looked:
Workflow 1: Gmail node pulled new emails, filtered, then passed them to an AI classifier (OpenAI in n8n), which then posted to Discord for human approval.
Discord approval: required a custom Discord bot in JavaScript to catch emoji reactions for approve or deny.
Workflow 2: the bot triggered a second n8n workflow that found the Gmail draft and sent the reply back to Airbnb.
It worked, and it saved time. But it was three moving parts, two workflows plus a bot, and every tweak meant diving deep into JSON paths and node settings.
Where n8n Started to Hurt
Running AI inside n8n made the rough spots even rougher.
JSON gymnastics meant digging through deep paths for dynamic data.
Prompt spaghetti meant AI outputs fed into more AI steps and created instability.
Debugging fatigue meant tracing breaks across scattered node logs.
Maintenance drag meant changing prompts in multiple places instead of one spot.
n8n is great for predictable flows. AI is by nature unpredictable. I realized I needed a boundary.
The Pivot: ADK for AI, n8n for Orchestration
The new design draws a clear line.
- n8n keeps the reliable parts: Gmail trigger, filtering, webhooks, retries.
- Google ADK takes care of all the AI logic and decisions.
- FastAPI fronts the agent with clean routes.
Notifications and Human Approval
One of the trickiest parts of my original design was handling notifications and approvals. At first, I leaned on Discord because that's where I already spent a lot of time. The problem was that Discord required a bot to capture reactions, which added a whole new piece of code to maintain.
When I switched to Slack, it immediately simplified things. The AI agent first decides whether a reply is needed and drafts the message. Only after that step does the API send a Slack notification with the draft included and an approval link. The user sees the suggested reply, clicks approve or reject in Slack, and that action routes back to the same FastAPI service. Approvals now feel smooth, predictable, and way easier to maintain. Slack's webhook and API model fits the job better and eliminates an entire layer of unnecessary code.
Before and After
v1 Old
Gmail → n8n (AI classify) → Discord (approval notification)
│ │
└────────────┬──────┘
▼
Discord Bot
│
▼
n8n (Send email)
v2 New
Gmail → n8n (filter) → FastAPI /ai → ADK Agent (decide and draft)
│
▼
Slack notification with draft + approval link
User reviews draft in Slack → clicks approval URL → FastAPI /approve
→ ADK finalizes and sends email
In the new version, the notification step comes after the AI has drafted a response. Slack delivers the draft for human approval, making the flow clear and lightweight.
The n8n Bits That Stay (and Shine)
- Gmail trigger
- Webhook node to call the API
- Retries and timeouts
What I Learned
If you have multiple chained AI steps, keep them in code, not in a workflow builder.
Boundaries matter. Let n8n orchestrate and let ADK do the reasoning.
For human in the loop, Slack makes life so much easier than Discord. Simple webhooks and links beat maintaining a custom bot any day.
Closing Thoughts
I'm still a fan of n8n. It's my orchestration panel. But once the workflow becomes AI heavy, moving that logic into a small, testable service with ADK has made everything simpler, faster, and far easier to debug.