This n8n workflow template is designed to route user input to specialized agents (like a Reminder Agent, Email Agent, etc.) using a structured output from a language model. Here's a complete description of what it does and how each part works: --- π Workflow Purpose: This template receives a user's request via Webhook, processes it using an LLM, extracts structured data like the agent name and user query, and routes the input to the appropriate sub-workflow (agent) based on the specified agent t

This n8n workflow template is designed to route user input to specialized agents (like a Reminder Agent, Email Agent, etc.) using a structured output from a language model. Here's a complete description of what it does and how each part works: --- π Workflow Purpose: This template receives a user's request via Webhook, processes it using an LLM, extracts structured data like the agent name and user query, and routes the input to the appropriate sub-workflow (agent) based on the specified agent type. --- π§© Workflow Breakdown: 1. Webhook (Trigger) Node: Webhook Purpose: Accepts a POST request from any frontend or API source. It contains the raw user input. --- 2. GPT Model (LLM Inference) Node: GPT 4o Mini Purpose: Interprets the user input and determines: Which agent should handle it (e.g., "Reminder Agent", "Email Agent", etc.) The actual user request (in structured format) --- 3. Auto-Fixing Output Parser Node: Auto-fixing Output Parser Purpose: Ensures that the output from the LLM matches the expected structure. If there's a mismatch, it automatically corrects it using a re-prompt. --- 4. Structured Output Parser Node: Structured Output Parser Purpose: Converts the language model's response into a strict JSON structure with keys like: "Agent Name" "user input" "sessionID" --- 5. Agent Router Node: Switch ("Agent Route") Purpose: Based on "Agent Name", it routes the input to one of the following sub-workflows: π Reminder Agent π§ Email Agent π§Ύ Document Agent π€ Meeting Agent --- 6. Sub-Workflow Call (Execute Workflow) Each agent is implemented as a separate n8n workflow: The input is forwarded to the selected agent. For example, if "Agent Name" is "Reminder Agent", the workflow "Reminder Agent" is called with "user input". --- 7. Webhook Response After the sub-agent workflow finishes, a Respond to Webhook node sends the output back as an HTTP response. --- β Key Features: Fully modular and extensible LLM-driven routing using OpenRouter GPT-4o Auto-corrects structured output errors Clean separation of concerns (agent logic is decoupled in sub-workflows) Easily add more agents by updating the switch logic --- π¦ Use Case Examples: User says: βRemind me to call my mom tomorrow.β β Routed to Reminder Agent User says: βSend an email to the HR team.β β Routed to Email Agent User says: βSchedule a meeting with John next week.β β Routed to Meeting Agent ---
Download the workflow JSON file after purchase.
Open n8n β click the menu β Import from File.
Select the downloaded JSON and import.
Set up credentials for each node that requires them.
Click Execute Workflow to test, then activate.
Setup guide included
Purchase to unlock the full step-by-step guide
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.