AutomationMart
Home/Browse/Anthropic AI agent: Claude Sonnet 4 and Opus 4 with Think and Web Search tool
n8n

Anthropic AI agent: Claude Sonnet 4 and Opus 4 with Think and Web Search tool

n8nn8n10 modulesv1.0
LinkedIn

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 1. 🔁 Dynamic Model Selection Automatically routes each user query to either Claude Sonnet 4 (for routine tasks) or Claude Opus 4 (for complex reasoning), ensuring

At a glance

Anthropic AI agent: Claude Sonnet 4 and Opus 4 with Think and Web Search tool is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects LinkedIn. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
LinkedIn
Modules
10
Price
Free
Version
v1.0
Anthropic AI agent: Claude Sonnet 4 and Opus 4 with Think and Web Search tool workflow diagram

About this workflow

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 1. 🔁 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. 2. 🧠 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. 3. 📎 Memory Integration Uses session-based memory to maintain conversational context, making interactions more coherent and human-like. 4. 🧮 Built-in Calculation Tool Handles numeric queries using an integrated calculator tool, reducing the need for external processing. 5. 📤 Structured Output Parser Ensures outputs are always well-structured and formatted in JSON, which improves consistency and downstream integrations. 6. 🌐 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: websearch 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 1. 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. 2. Query Processing and Response Generation - The selected model processes the query, leveraging tools like websearch 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 1. 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. 2. Tool Integration - Attach the "websearch" 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. 3. Credentials - Provide an Anthropic API key to all nodes requiring authentication (e.g., model nodes, web search). 4. 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. 5. 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.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

AI-powered CV extractor: Google Drive to Sheet with GPT-4 + Slack for recruiters

CV Extractor: Google Drive to Sheet + Slack Update for Recruiters Watch the demo video below: []( > This workflow automatically processes resumes (PDFs) uploaded or updated in a Google Drive folder. It extracts and structures the candidate’s information using AI, then updates or inserts the data into a Google Sheet, acting as a central talent database. Finally, it notifies the hiring team via Slack with a summary. Perfect for HR and TA teams, this automation eliminates the repetitive task of

Free

Generate UGC promo videos with OpenAI, Sora 2 and Blotato for eCommerce

Generate UGC Promo Videos with Blotato and Sora 2 for eCommerce 🧩 Who is this for? This workflow is perfect for eCommerce brands, content creators, and marketing teams who want to automatically generate short, eye-catching videos from their product images — without editing software or manual work. 🚀 What problem does this workflow solve? Creating engaging promotional videos manually can be time-consuming and expensive.

Free

Find step-by-step recipes from API Ninjas Recipe API in an n8n AI agent

Video Introduction []( Want to automate your inbox or need a custom workflow? 📞 Book a Call | 💬 DM me on Linkedin --- Workflow Overview This workflow creates an intelligent AI chatbot that retrieves recipes from an external API through natural conversation. When users ask for recipes, the AI agent automatically determines when to use the recipe lookup tool, fetches real-time data from the API Ninjas Recipe API, and provides helpful, conversational responses. This demonstrates the powerful capabi

Free

Share new Google Photos media on Linkedin

When you add a new image to the specified Google Photos folder, it will be shared as a LinkedIn post.

Free

AI-powered lead research & personalized email generation with Groq & Google Sheets

Overall Description & Potential << What Does This Flow Do? >> Overall, this workflow is an intelligent sales outreach automation engine that transforms raw leads from a form or a list into highly personalized, ready-to-send introductory email drafts. The process is: it starts by fetching data, enriches it with in-depth AI research to uncover "pain points," and then uses those research findings to craft an email that is relevant to the solutions you offer. This system so

Free

AI-powered one-click virtual fitting room for WooCommerce, Shopify, Prestashop

This low-code automation enables all eCommerce store visitors to upload a photo of themselves and virtually “try on” a garment in just a few clicks. With this workflow, WooCommerce, Prestashop, Shopify and more merchants can offer a cutting-edge “virtual try-on” feature with minimal development effort, enhancing customer engagement and reducing product returns. --- Key Advantages Zero-Coding, Visual Setup Build end-to-end e-commerce features with drag-and-drop nodes

Free

Generate 100+ ad variations from one image with Fal.AI Nano Banana and GPT-5

Scale Your Creative Strategy: 100+ Creative Ads from 1 Image using Fal.AI, Nano Banana model and GPT-5.1 This workflow turns a single reference image into up to 100 high-performing ad variations using Fal.AI's Nano Banana model and GPT-5.1. Simply upload your inspiration to a form, and watch as unique, campaign-ready images appear in your Google Drive. Why use this? Scale Instantly: Turn one idea into a full campaign without manual design work. Smart Variations: Uses GPT-5.1 to analyze your re

Free

Conversational interviews with AI agents and n8n forms

This n8n template combines an AI agent with n8n's multi-page forms to create a novel interaction which allows automated question-and-answer sessions. One of the more obvious use-cases of this interaction is what I'm calling the AI interviewer. You can read the full post here: Live demo here: How it works A form trigger is used to start the interview and a new session is created in redis to capture the transcript. An AI agent is then tasked to ask questions to the user regarding the topic of

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free