by Julian Reich
This n8n workflow automates the transformation of press releases into polished articles. It converts the content of an email and its attachments (PDF or Word documents) into an AI-written article/blog post. What does it do? This workflow assists editors and journalists in managing incoming press-releases from governments, companies, NGOs, or individuals. The result is a draft article that can easily be reviewed by the editor, who receives it in a reply email containing both the original input and the output, plus an AI-generated self-assessment. This self-assessment represents an additional feedback loop where the AI compares the input with the output to evaluate the quality and accuracy of its transformation. How does it work? Triggered by incoming emails in Google, it first filters attachments, retaining only Word and PDF files while removing other formats like JPGs. The workflow then follows one of three paths: If no attachments remain, it processes the inline email message directly. For PDF attachments, it uses an extractor to obtain the document content. For Word attachments, it extracts the text content by a http request. In each case, the extracted content is then passed to an AI agent that converts the press release into a well-structured article according to predefined prompts. A separate AI evaluation step provides a self-assessment by comparing the output with the original input to ensure quality and accuracy. Finally, the workflow generates a reply email to the sender containing three components: the original input, the AI-generated article, and the self-assessment. This streamlined process helps editors and journalists efficiently manage incoming press releases, delivering draft articles that require minimal additional editing." How to set it up 1. Configure Gmail Connection: Create or use an existing Gmail address Connect it through the n8n credentials manager Configure polling frequency according to your needs Set the trigger event to "Message Received" Optional: Filter incoming emails by specifying authorized senders Enable the "Download Attachments" option 2. Set Up AI Integration: Create an OpenAI account if you don't have one Create a new AI assistant or use an existing one Customize the assistant with specific instructions, style guidelines, or response templates Configure your API credentials in n8n to enable the connection 3. Configure Google Drive Integration: Connect your Google Drive credentials in n8n Set the operation mode to "Upload" Configure the input data field name as "data" -Set the file naming format to dynamic: {{ $json.fileName }} 4. Configure HTTP Request Node: Set request method to "POST" Enter the appropriate Google API endpoint URL Include all required authorization headers Structure the request body according to API specifications Ensure proper error handling for API responses 5. Configure HTTP Request Node 2: Set request method to "GET" Enter the appropriate Google API endpoint URL Include all required authorization headers Configure query parameters as needed Implement response validation and error handling 6. Configure Self-Assessment Node: Set operation to "Message a Model" Select an appropriate AI model (e.g., GPT-4, Claude) Configure the following prompt in the Message field: Please analyze and compare the following input and output content: (for example) Original Input: {{ $('HTTP Request3').item.json.data }} {{ $('Gmail Trigger').item.json.text }} Generated Output: {{ $json.output }} Provide a detailed self-assessment that evaluates: Content accuracy and completeness Structure and readability improvements Tone and style appropriateness Any information that may have been omitted or misrepresented Overall quality of the transformation 7. Configure Reply Email Node: Set operation to "Send" and select your Gmail account Configure the "To" field to respond to the original sender: {{ $('Gmail Trigger').item.json.from }} Set an appropriate subject line: RE: {{ $('Gmail Trigger').item.json.subject }} Structure the email body with clear sections using the following template: handlebars EDITED ARTICLE* {{ $('AI Article Writer 2').item.json.output }} SELF-ASSESSMENT* Rating: 1 (poor) to 5 (excellent) {{ $json.message.content }} ORIGINAL MESSAGE* {{ $('Gmail Trigger').item.json.text }} ATTACHMENT CONTENT* {{ $('HTTP Request3').item.json.data }} Note: Adjust the template fields according to the input source (PDF, Word document, or inline message). For inline messages, you may not need the "ATTACHMENT CONTENT" section.
by Samir Saci
Tags: Supply Chain, Logistics, Control Tower Context Hey! I’m Samir, a Supply Chain Engineer and Data Scientist from Paris, and the founder of LogiGreen Consulting. We design tools to help companies improve their logistics processes using data analytics, AI, and automation—to reduce costs and minimize environmental impact. > Let’s use N8N to build smarter and more sustainable supply chains! 📬 For business inquiries, you can add me on LinkedIn Who is this template for? This workflow template is designed for logistics operations that need a monitoring solution for their distribution chains. Connected to your Transportation Management Systems, this AI agent can answer any question about the shipments handled by your distribution teams. How does it work? The workflow is connected to a Google BigQuery table that stores outbound order data (customer deliveries). Here’s what the AI agent does: 🤔 Receives a user question via chat. 🧠 Understands the request and generates the correct SQL query. ✅ Executes the SQL query using a BigQuery node. 💬 Responds to the user in plain English. Thanks to the chat memory, users can ask follow-up questions to dive deeper into the data. What do I need to get started? This workflow requires no advanced programming skills. You’ll need: A Google BigQuery account with an SQL table storing transactional records. An OpenAI API key (GPT-4o) for the chat model. Next Steps Follow the sticky notes in the workflow to configure each node and start using AI to support your supply chain operations. 🎥 Watch My Tutorial 🚀 Curious how N8N can transform your logistics operations? Notes The chat trigger can easily be replaced with Teams, Telegram, or Slack for a better user experience. You can also connect this to a customer chat window using a webhook. This workflow was built using N8N version 1.82.1 Submitted: March 24, 2025
by Ghaith Alsirawan
🧠 This workflow is designed for one purpose only, to bulk-upload structured JSON articles from an FTP server into a Qdrant vector database for use in LLM-powered semantic search, RAG systems, or AI assistants. The JSON files are pre-cleaned and contain metadata and rich text chunks, ready for vectorization. This workflow handles Downloading from FTP Parsing & splitting Embedding with OpenAI-embedding Storing in Qdrant for future querying JSON structure format for blog articles { "id": "article_001", "title": "reseguider", "language": "sv", "tags": ["london", "resa", "info"], "source": "alltomlondon.se", "url": "https://...", "embedded_at": "2025-04-08T15:27:00Z", "chunks": [ { "chunk_id": "article_001_01", "section_title": "Introduktion", "text": "Välkommen till London..." }, ... ] } 🧰 Benefits ✅ Automated Vector Loading Handles FTP → JSON → Qdrant in a hands-free pipeline. ✅ Clean Embedding Input Supports pre-validated chunks with metadata: titles, tags, language, and article ID. ✅ AI-Ready Format Perfect for Retrieval-Augmented Generation (RAG), semantic search, or assistant memory. ✅ Flexible Architecture Modular and swappable: FTP can be replaced with GDrive/Notion/S3, and embeddings can switch to local models like Ollama. ✅ Community Friendly This template helps others adopt best practices for vector DB feeding and LLM integration.
by Samir Saci
Tags: Automation, AI, Marketing, Content Creation Context I’m a Supply Chain Data Scientist and content creator who writes regularly about data-driven optimization, logistics, and sustainability. Promoting blog articles on LinkedIn used to be a manual task — until I decided to automate it with N8N and GPT-4o. This workflow lets you automatically extract blog posts, clean the content, and generate a professional LinkedIn post using an AI Agent powered by GPT-4o — all in one seamless automation. >Save hours of repetitive work and boost your reach with AI. 📬 For business inquiries, you can add me on LinkedIn Who is this template for? This template is perfect for: Bloggers and writers** who want to promote their content on LinkedIn Marketing teams** looking to automate professional post-generation Content creators** using Ghost platforms It generates polished LinkedIn posts with: A hook A quick summary A call-to-action A signature to drive readers to your contact page How does it work? This workflow runs in N8N and performs the following steps: 🚀 Triggers manually or you can add a scheduler 📰 Pulls recent blog posts from your Ghost site (via API) 🧼 Cleans the HTML content for AI input 🤖 Sends content to GPT-4o with a tailored prompt to create a LinkedIn post 📄 Records all data (post content + LinkedIn output) in a Google Sheet What do I need to start? You don’t need to write a single line of code. Prerequisites: A Ghost CMS account with blog content A Google Sheet to store generated posts An OpenAI API Key Google Sheets API** connected via OAuth2 Next Steps Use the sticky notes in the workflow to understand how to: Add your Ghost API credentials Link your Google Sheet Customize the AI prompt (e.g., change the author name or tone) Optionally add auto-posting to LinkedIn using tools like Buffer or Make 🎥 Watch My Tutorial 🚀 Want to explore how automation can scale your brand or business? 📬 Let’s connect on LinkedIn Notes You can adapt this template for Twitter, Facebook, or even email newsletters by adjusting the prompt and output channel. This workflow was built using n8n 1.85.4 Submitted: April 9th, 2025
by n8n Team
The purpose of this n8n workflow is to automate the process of identifying incoming Gmail emails that are requesting an appointment, evaluating their content, checking calendar availability, and then composing and sending a response email. Note that to use this template, you need to be on n8n version 1.19.4 or later.
by Matt F.
AI Customer-Support Assistant that auto-maps any business site, answers WhatsApp in real time, and lets you earn or save thousands by replacing pricey SaaS chat tools. ⚡ What the workflow does Live “AI employee”* - the bot crawls pages on demand (products, policies, FAQs) so you *never** upload documents or fine-tune a model. No-code setup** - Drop in API keys, paste your domain, publish the webhook—ready in \~15 min. Chat memory** - each conversation turn is written to Supabase/Postgres and automatically replayed into the next prompt, letting the assistant remember context so follow-up questions feel natural and coherent even across long sessions. WhatsApp ready** - Free-form replies inside the 24-hour service window, automatically switches to a template when required (recommended by Meta). 🚀 Why you’ll love it | Benefit | Impact | | ------------------------- | --------------------------------------------------------------------- | | Zero content training | Point the AI Agent at any domain → go live. | | Save or earn money | Replace pricey SaaS chat tools or sell white-label bots to clients. | | Channel-agnostic | Ships with WhatsApp; swap one node for Telegram, Slack, or web chat. | | Flexible voice | Adjust tone & language by editing one prompt line. | 🧰 Prerequisites (all free-tier friendly) OpenAI key Meta WhatsApp Cloud API number + permanent token (easy setup) Supabase (or Postgres) URL for chat memory (easy setup) 🛠 5-step setup Import the template into n8n. Add credentials for OpenAI, WhatsApp, and Supabase. Enter your root domain in the root\_url variable. Point Meta’s Webhook to the n8n URL. Hit Execute Trigger and send “Hi” from WhatsApp—watch the bot answer with live data. 🔄 Easy to extend Voice & language** – change wording in the System Prompt. Escalation** – add an “If fallback” branch → Zendesk, email, live agents. Extra channels** – duplicate the reply node for Telegram or Slack. Commerce API hooks** – plug in Shopify, Woo, Stripe for order status or payments. 💡 Monetization ideas Replace costly SaaS seats.* Deploy the bot on your own server and *stop paying \$300–\$500 every month for third-party “AI support” platforms. Sell it as a service.* Spin up a branded instance for local shops, clinics, or e-commerce stores and *charge each client \$300–\$500 per month**—setup time is under 15 minutes. Upsell premium coverage (24/7 human hand-off) once the bot handles routine questions. Embed product links in answers and earn affiliate or upsell revenue automatically. Spin it up, connect a domain and a phone number, and you—or your customers—get enterprise-grade support without code, training, or ongoing licence fees.
by Thong
🧠 What This Workflow Does This n8n workflow allows you to upload a T-shirt mockup design (even if it's rough or outdated), and automatically turns it into a refined, print-ready artwork using the power of AI. It starts with an image of a T-shirt design, analyzes it using OpenAI's vision model, and then generates a cleaner, upgraded prompt to be used with OpenAI’s image generation API (gpt-image-1). The final output is a new T-shirt graphic optimized for printing on solid black background, with no visible shirt or mockup framing. ⚙️ How It Works User Sends a T-shirt Mockup Image Link The workflow begins when the user drops an image link (T-shirt mockup) into a chat interface or input trigger. AI Analyzes the Image (OpenAI Vision) Using OpenAI’s GPT-4 vision capabilities, the workflow extracts the key design elements from the image: Characters, text, layout Graphic style, composition Visual tone and focus AI Agent Creates a Refined Prompt The extracted details are passed to an AI agent that: Preserves the original layout and message Enhances the visual composition and typography Removes mockup elements like shirt collar, sleeves, shadows. Locks the artwork on a pure black background only Outputs a clean, artistic, JSON-safe one-line prompt for generation Text Escaping for API Compatibility A JavaScript function node escapes the prompt (quotes, slashes, line breaks) to make it safe for use in downstream JSON requests. Image Generation via GPT-Image-1 API or IMAGEN 4 from GOOGLE The final prompt is sent to OpenAI’s gpt-image-1 to generate a brand-new artwork — ideal for direct printing on a black T-shirt. ⚠️ Cost Notice for gpt-image-1 Usage This workflow uses OpenAI's gpt-image-1 model to generate high-quality T-shirt artwork from refined prompts. Please note that this model is a paid service, and each image generation request may cost approximately $0.25 per design, depending on resolution and usage. We strongly recommend users to review their OpenAI API usage plan and be mindful of costs when running this workflow, especially if generating in bulk or integrating into larger automation flows. You can monitor your usage at: https://platform.openai.com/docs/models/gpt-image-1 (Optional) You can send the result to Telegram, upload to Notion, or store it in your design system. ✅ Key Features Works from any uploaded mockup image Converts design concepts into print-ready artwork prompts Avoids outputting shirt models, collars, or product mockups Optimized for solid black background with no distractions Modular and easy to connect with file delivery or approval flows 🚀 How to Use Import the .json workflow into n8n Configure your OpenAI credentials for both vision and image APIs Trigger the flow by sending an image url of a T-shirt mockup Let the workflow generate and return a brand-new design from that concept
by Yaron Been
Stop manually checking keyword rankings and let automation do the work for you. This comprehensive SEO monitoring workflow automatically tracks your keyword positions, compares them against your target URLs, and instantly alerts your team via Slack whenever rankings change - ensuring you never miss critical SEO movements. ✨ What This Workflow Does: 📊 Automated Rank Checking**: Continuously monitors keywords stored in Airtable 🔍 Real-Time SERP Analysis**: Uses Firecrawl API to fetch current search rankings 📈 Intelligent Comparison**: Compares current vs. previous rankings automatically 📝 Database Updates**: Updates Airtable records with new ranking data 🚨 Instant Alerts**: Sends Slack notifications only when rankings change 🎯 Target URL Matching**: Specifically tracks your domain's position in search results 🔧 Key Features: Trigger-based automation** that activates when Airtable data changes Smart rank comparison** logic that prevents false alerts Conditional notifications** - only alerts on actual ranking changes Clean data management** with automatic Airtable updates Team collaboration** through Slack integration Scalable monitoring** for unlimited keywords 📋 Prerequisites: Airtable account with Personal Access Token Firecrawl API key for SERP data Slack workspace with API access Basic Airtable setup with keyword data 🎯 Perfect For: SEO agencies managing multiple client campaigns Digital marketing teams tracking organic performance Content creators monitoring content rankings E-commerce businesses tracking product visibility Startups needing cost-effective SEO monitoring Any business serious about search visibility 💡 How It Works: Data Collection: Fetches keywords, target URLs, and current ranks from Airtable SERP Analysis: Queries Firecrawl API for real-time search results Rank Detection: Searches results for your target URL and determines position Smart Comparison: Compares new ranking against stored data Database Update: Updates Airtable with latest ranking information Conditional Alert: Sends Slack notification only if ranking changed Team Notification: Delivers actionable ranking updates to your team 📦 What You Get: Complete n8n workflow with all integrations configured Airtable template with proper field structure Firecrawl API integration setup Slack notification templates Comprehensive setup documentation Sample keyword data for testing 🚀 Benefits: Save Hours Weekly**: Eliminate manual rank checking Never Miss Changes**: Get instant alerts on ranking movements Team Alignment**: Keep everyone informed via Slack Historical Tracking**: Maintain ranking history in Airtable Cost Effective**: Replace expensive SEO tools with automation Scalable Solution**: Monitor unlimited keywords effortlessly 💡 Need Help or Want to Learn More? Created by Yaron Been 📧 Support: Yaron@nofluff.online 🎥 YouTube Tutorials: https://www.youtube.com/@YaronBeen/videos 💼 LinkedIn: https://www.linkedin.com/in/yaronbeen/ Discover more SEO automation workflows and digital marketing tutorials on my channels! 🏷️ Tags: SEO, Keyword Tracking, Airtable, Slack, Firecrawl, SERP, Automation, Rank Monitoring, Digital Marketing, Search Rankings
by Dhrumil Patel
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
by Daniel Rosehill
AI Agent System Prompt 'Auto-Tuner' This workflow configures an AI agent which provides an edited system prompt for an autonomous AI agent Based on the following pieces of information provided by the user in an input form: Agent name Agent purpose What's working What's not working Current system prompt There are two additional form elements that I've marked as non-required but if you want to force more detail from the user you can mark these as required: Example prompt Example output This information gets sent to the AI agent which is configured with a system prompt of its own and the form elements are concatenated into a user prompt prompting the agent to evaluate the system prompt, deliver an improved version, and provide some notes for logging. The output structure is constrained with JSON. OpenAI 4o is recommended for its overall strong adherence to structured outputs. Once the agent delivers its improved system prompt, this gets passed to the user via email notification. The final delivery stage can be alternated according to user preference When This Is Useful Anyone working on AI agent configurations will likely be familiar with the pivotal importance of the system prompt in directing the desired behavior of the agent. Frequently this requires long hours of iteration before a consistent desired behaviour is achieved. Sometimes we can figure out what's working and not based on our own intuition and experience, but at other times soliciting the outside perspective of another AI tool can be a helpful way to consider alternative explanations or improve our own prompt engineering. This configuration is intended to speed up this iterative process and reduce the amount of time we spend working on system prompts to configure effective agent workflows
by Akhil Varma Gadiraju
Conference Feedback Collection and OneDrive Logging Workflow This n8n workflow is designed to collect feedback through a web form, log the responses into an Excel file stored in Microsoft OneDrive, and notify the support team via email. 🧭 Overall Goal To collect user feedback from a web form, structure the data, log it into a OneDrive Excel file, and notify support via Outlook email. 🔄 Workflow Breakdown 1. Form Submission (On form submission) Node Type**: formTrigger Purpose**: Captures user feedback via a web form. Form Fields**: Full Name (Required) Email (Required) Company Name Job Title How did you hear about the conference? (Required) Overall experience rating (Required) Favorite sessions/speakers Relevance to interests/work (Required) Networking opportunities (Required) Suggestions for improvement Future topics/speakers Willingness to attend again (Required) Additional comments Contact permission (Required) Access URL**: /webhook/feedback (or /webhook-test/feedback during testing) 2. Parse Data (Set) Purpose**: Renames form fields to snake_case. Output**: Structured JSON with renamed fields. 3. Sample File (Convert to File) Purpose**: Generates a file name reference for search. Filename**: test-n8n-feedback-form-data.xlsx 4. Search Document (Microsoft OneDrive) Purpose**: Searches OneDrive for the specified Excel file. Query**: test-n8n-feedback-form-data.xlsx 5. Extract File ID (Code) Purpose**: Extracts the ID of the file from the search result. Output**: { "id": "someFileId" } or { "id": null } 6. Check File Existence (If) Purpose**: Branch logic based on file existence. Condition**: If id exists. 7. Build Sheet Data (Set) Purpose**: Prepares the data to match the Excel column headers. Only Runs If**: File was found. 8. Append Data to Excel (Microsoft Excel) Purpose**: Appends the new feedback as a row. Workbook ID**: {{ $('Code').item.json.id }} Worksheet Name**: Sheet1 Mode**: Auto-map from input fields 9. Notify Support (Microsoft Outlook) Purpose**: Sends a notification email with key feedback details. To**: test@gmail.com Subject**: "New Feedback Submission Received" Body**: Includes key details from submission 10. End Workflow (NoOp) Purpose**: Marks logical end of the workflow. 📝 Sticky Notes ✅ Upload Target Excel File First: Ensure the Excel file exists in OneDrive. 📝 Filename Consistency: Filename should match in "Sample File" and "Search Document" nodes. 📧 Customize Email Content: Update "Notify Support" node with your desired message and recipient. 🔧 Customization Guide 🧾 Form Customization Change form title, description, fields, or path. 🧪 Parsing Logic Update field mappings if form labels change. 📁 Excel File Settings Filename must match your actual OneDrive file. Worksheet name and column headers must match in "Build Sheet Data". 📬 Email Settings Update subject and body using variables like {{ $('Parse Data').item.json.full_name }}. ❗ Error Handling Tips Adjust email content based on file presence. Add an "Error Trigger" for advanced error management. 🔁 Alternatives and Extensions Use Google Sheets, Airtable, or databases instead of OneDrive/Excel. Add Slack or SMS notifications. 📌 Use Cases Post-event Feedback CSAT Surveys Employee Feedback Bug Reporting Lead Capture Contact Forms Webinar Registration 🔐 Required Credentials 1. Microsoft OneDrive (OAuth2) Used by**: "Search Document" Credential Name**: Microsoft Drive account 2. Microsoft Excel (OAuth2) Used by**: "Append Data" Credential Name**: Microsoft Excel account 3. Microsoft Outlook (OAuth2) Used by**: "Notify Support" Credential Name**: Outlook 0Auth2 ❤️ Made with n8n by Akhil
by Davide
This workflow dynamically chooses between two new powerful Anthropic models — Claude Opus 4 and Claude Sonnet 4 — to handle user queries, based on their complexity and nature, maintaining scalability and context awareness with Anthropic web search function and Think tool. Key Advantages 🔁 Dynamic Model Selection Automatically routes each user query to either Claude Sonnet 4 (for routine tasks) or Claude Opus 4 (for complex reasoning), ensuring optimal performance and cost-efficiency. 🧠 AI Agent with Tool Use The AI agent can utilize a web search tool to retrieve up-to-date information and a Think tool for complex reasoning processes — improving response quality. 📎 Memory Integration Uses session-based memory to maintain conversational context, making interactions more coherent and human-like. 🧮 Built-in Calculation Tool Handles numeric queries using an integrated calculator tool, reducing the need for external processing. 📤 Structured Output Parser Ensures outputs are always well-structured and formatted in JSON, which improves consistency and downstream integrations. 🌐 Web Search Capability Supports real-time information retrieval for current events, statistics, or details not available in the AI’s base knowledge. Components Overview Trigger**: Listens for new chat messages. Routing Agent**: Analyzes the message and returns the best model to use. AI Agent**: Handles the conversation, decides when to use tools. Tools**: web_search for internet queries Think for reasoning Calculator for math tasks Models Used**: claude-sonnet-4-20250514: Optimized for general and business logic tasks. claude-opus-4-20250514: Best for deep, strategic, and analytical queries. How It Works Dynamic Model Selection The workflow begins when a chat message is received. The Anthropic Routing Agent analyzes the user's query to determine the most suitable model (either Claude Sonnet 4 or Claude Opus 4) based on the query's complexity and requirements. The routing agent uses predefined criteria to decide: Claude Sonnet 4: Best for standard tasks like real-time workflow routing, data validation, and routine business logic. Claude Opus 4: Reserved for complex scenarios requiring deep reasoning, advanced analysis, or high-impact decisions. Query Processing and Response Generation The selected model processes the query, leveraging tools like web_search for real-time information retrieval, Think for internal reasoning, and Calculator for numerical tasks. The AI Agent coordinates these tools, ensuring the response is accurate and context-aware. A Simple Memory node retains session context for coherent multi-turn conversations. The final response is formatted and returned to the user without intermediate steps or metadata. Set Up Steps Node Configuration Trigger: Configure the "When chat message received" node to handle incoming user queries. Routing Agent: Set up the "Anthropic Routing Agent" with the system message defining model selection logic. Ensure it outputs a JSON object with prompt and model fields. AI Model Nodes: Link the "Sonnet 4 or Opus 4" node to dynamically use the selected model. The "Sonnet 3.7" node powers the routing agent itself. Tool Integration Attach the "web_search" HTTP tool to enable internet searches, ensuring the API endpoint and headers (e.g., anthropic-version) are correctly configured. Connect auxiliary tools (Think, Calculator) to the "AI Agent" for extended functionality. Add the "Simple Memory" node to maintain conversation history. Credentials Provide an Anthropic API key to all nodes requiring authentication (e.g., model nodes, web search). Testing Activate the workflow and test with sample queries to verify: Correct model selection (e.g., Sonnet for simple queries, Opus for complex ones). Proper tool usage (e.g., web searches trigger when needed). Memory retention across chat turns. Deployment Once validated, set the workflow to active for live interactions. Need help customizing? Contact me for consulting and support or add me on Linkedin.