跳到正文
n8n Blog· Liam Hampton·· 3 小時前AI 評分56

如何用 Gemini 4 Argon 構建 n8n 工作流:MCP、Assistant 和 Agent

Build n8n workflows with Gemini 4 Argon: MCP, the Assistant, and Agents

AI 導讀

n8n 介紹了在工作流中使用 Gemini 4 Argon 的三種方式:MCP、n8n Assistant 和 Agent。n8n 內置的 MCP 伺服器可讓兼容工具建立並測試工作流,並在發布前先徵求用戶確認;Gemini 4 Argon 亦可用於 Agent,並可透過獨立的 Google Gemini 節點調用,相關介紹見 https://n8n.io/ai-agents/。

正文

Build n8n workflows with Gemini 4 Argon: MCP, the Assistant, and Agents

Gemini 4 Argon just dropped, and n8n is one of the first companies to use and integrate the model. Check out how you can use it with your existing n8n workflows and how to build new ones. Here are the benchmarks Google published:

Build n8n workflows with Gemini 4 Argon: MCP, the Assistant, and Agents

Benchmarks reported by Google. Source: Gemini 4 Argon announcement.

Model Context Protocol (MCP) -  Use Gemini to build workflows from your favourite AI tool

MCP is an open standard governed by the Agentic AI Foundation (AAIF) that allows your AI tools to connect to external applications and data sources. n8n has a built in MCP server that works with any MCP client that you can utilize to build your own workflows from your favourite AI tool. All you need for this is access to Gemini 4 Argon in your developer tool and an idea of what you want to build!

Setup only takes a couple of minutes. Turn on instance-level MCP in your n8n instance, then add your server URL to any MCP-compatible tool, whether that’s a chat app, a coding agent or an IDE. Many tools support one-click setup and sign in with OAuth or use an API key.

Build n8n workflows with Gemini 4 Argon: MCP, the Assistant, and Agents

Example use case: You're in your IDE building out a new signup form and the web hook is ready. You pop a question into your agent: "Build me an n8n workflow that catches new signups from this webhook, drops them into our CRM, and fires off a welcome message in Slack." A minute later it's there in your n8n workspace, built and tested. It stops short of publishing and asks first, keeping you as the human, in the loop.

Bring Your Own Key (BYOK) to the n8n Assistant

The n8n Assistant is a chat-based agent that builds, edits, tests, and debugs workflows from plain language. BYOK means it runs on an AI provider account you already hold, rather than a model picked for you. How you get it running depends on where your n8n instance lives. 

On self-hosted, you supply the key yourself and decide where your data and model calls go. You drop your key into the instance's settings once, and the Assistant runs on that model. One account, one model, one context. The Assistant doesn't have a native Gemini option yet, so you reach Gemini through OpenRouter or through Google's OpenAI-compatible endpoint (base URL: https://generativelanguage.googleapis.com/v1beta/openai/). 

On n8n Cloud, there's nothing to set up. The Assistant runs on n8n Assistant credits, and the workflows it builds can use Gemini 4 Argon through Gateway credits.

Where the n8n Assistant fits in for you

The Assistant is a chat-based agent that builds, edits, tests, and debugs workflows from plain language. How you get it running follows the same split.

On self-hosted, you drop your key into the instance's settings once, and the Assistant runs on that model. One account, one model, one context.

On n8n Cloud, there's nothing to set up. The Assistant runs on n8n Assistant credits, and the workflows it builds can use Gemini 4 Argon through Gateway credits.

Build n8n workflows with Gemini 4 Argon: MCP, the Assistant, and Agents

n8n Agent - let AI do the heavy lifting in your workflow

An agent is just a model handed a goal and a toolkit. It figures out the steps to get there on its own.

In n8n, you set up an agent and use a model such as Gemini 4 Argon for the thinking. Plug in the tools it's allowed to use (any node, API, or sub-workflow), and optionally add memory so it keeps context. From there, the agent decides which tool to call next, loops, and stops when the task is done. Gemini 4 Argon is available as a model for your Agents and in the standalone Google Gemini node from launch. On n8n Cloud you can also use it through Gateway credits, so you don't need a separate provider account or extra billing. Check out how AI agents work in n8n: https://n8n.io/ai-agents/

Why bother? Rigid, step-by-step workflows fall apart the moment input gets messy. An agent absorbs the judgment calls, the surrounding workflow stays predictable, and you still draw a hard line around which tools it can reach.

Example use case: Let’s say you have an incoming support email. The agent reads it, pulls the customer record from your CRM and then cross-references your help docs. It drafts a reply, sets the ticket priority, or drops a flag into Slack for a human to handle.

Wrap up

This is just three ways you can use the Google Gemini 4 Argon model in n8n to build your workflows. Whether you're using it via the n8n MCP to build workflows from inside your favourite AI tool, using your own API key with the n8n Assistant to get the latest model working alongside you, or using an Agent to have the workflow handle judgement calls so you don’t have to.

Pick the one that works best for you! Happy building.

來源:n8n Blog · blog.n8n.io