Skip to content

Commit 357c624

Browse files
authored
Add n8n to third-party tools (#1030)
* Add n8n page to third-party tools * Updates
1 parent bcbaa09 commit 357c624

File tree

5 files changed

+153
-0
lines changed

5 files changed

+153
-0
lines changed

docs/assets/tools-n8n.png

3.7 KB
Loading

docs/tools/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,16 @@ Check out the following pre-built tools that you can use with ADK agents:
253253
</div>
254254
</a>
255255

256+
<a href="/adk-docs/tools/third-party/n8n/" class="tool-card">
257+
<div class="tool-card-image-wrapper">
258+
<img src="../assets/tools-n8n.png" alt="n8n">
259+
</div>
260+
<div class="tool-card-content">
261+
<h3>n8n</h3>
262+
<p>Trigger automated workflows, connect apps, and process data</p>
263+
</div>
264+
</a>
265+
256266
<a href="/adk-docs/tools/third-party/notion/" class="tool-card">
257267
<div class="tool-card-image-wrapper">
258268
<img src="../assets/tools-notion.png" alt="Notion">

docs/tools/third-party/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ Check out the following third-party tools that you can use with ADK agents:
119119
</div>
120120
</a>
121121

122+
<a href="/adk-docs/tools/third-party/n8n/" class="tool-card">
123+
<div class="tool-card-image-wrapper">
124+
<img src="../../assets/tools-n8n.png" alt="n8n">
125+
</div>
126+
<div class="tool-card-content">
127+
<h3>n8n</h3>
128+
<p>Trigger automated workflows, connect apps, and process data</p>
129+
</div>
130+
</a>
131+
122132
<a href="/adk-docs/tools/third-party/notion/" class="tool-card">
123133
<div class="tool-card-image-wrapper">
124134
<img src="../../assets/tools-notion.png" alt="Notion">

docs/tools/third-party/n8n.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# n8n
2+
3+
The [n8n MCP Server](https://docs.n8n.io/advanced-ai/accessing-n8n-mcp-server/)
4+
connects your ADK agent to [n8n](https://n8n.io/), an extendable workflow
5+
automation tool. This integration allows your agent to securely connect to an
6+
n8n instance to search, inspect, and trigger workflows directly from a natural
7+
language interface.
8+
9+
!!! note "Alternative: Workflow-level MCP Server"
10+
11+
The configuration guide on this page covers **Instance-level MCP access**,
12+
which connects your agent to a central hub of enabled workflows.
13+
Alternatively, you can use the
14+
[MCP Server Trigger node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/)
15+
to make a **single workflow** act as its own standalone MCP server. This
16+
method is useful if you want to craft specific server behaviors or expose
17+
tools isolated to one workflow.
18+
19+
## Use cases
20+
21+
- **Execute Complex Workflows**: Trigger multi-step business processes defined
22+
in n8n directly from your agent, leveraging reliable branching logic, loops,
23+
and error handling to ensure consistency.
24+
25+
- **Connect to External Apps**: Access pre-built integrations through n8n
26+
without writing custom tools for each service, eliminating the need to manage
27+
API authentication, headers, or boilerplate code.
28+
29+
- **Data Processing**: Offload complex data transformation tasks to n8n
30+
workflows, such as converting natural language into API calls or scraping and
31+
summarizing webpages, utilizing custom Python or JavaScript nodes for precise
32+
data shaping.
33+
34+
## Prerequisites
35+
36+
- An active n8n instance
37+
- MCP access enabled in settings
38+
- A valid MCP access token
39+
40+
Refer to the
41+
[n8n MCP documentation](https://docs.n8n.io/advanced-ai/accessing-n8n-mcp-server/)
42+
for detailed setup instructions.
43+
44+
## Use with agent
45+
46+
=== "Local MCP Server"
47+
48+
```python
49+
from google.adk.agents import Agent
50+
from google.adk.tools.mcp_tool import McpToolset
51+
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
52+
from mcp import StdioServerParameters
53+
54+
N8N_INSTANCE_URL = "https://localhost:5678"
55+
N8N_MCP_TOKEN = "YOUR_N8N_MCP_TOKEN"
56+
57+
root_agent = Agent(
58+
model="gemini-2.5-pro",
59+
name="n8n_agent",
60+
instruction="Help users manage and execute workflows in n8n",
61+
tools=[
62+
McpToolset(
63+
connection_params=StdioConnectionParams(
64+
server_params=StdioServerParameters(
65+
command="npx",
66+
args=[
67+
"-y",
68+
"supergateway",
69+
"--streamableHttp",
70+
f"{N8N_INSTANCE_URL}/mcp-server/http",
71+
"--header",
72+
f"authorization:Bearer {N8N_MCP_TOKEN}"
73+
]
74+
),
75+
timeout=300,
76+
),
77+
)
78+
],
79+
)
80+
```
81+
82+
=== "Remote MCP Server"
83+
84+
```python
85+
from google.adk.agents import Agent
86+
from google.adk.tools.mcp_tool import McpToolset
87+
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPServerParams
88+
89+
N8N_INSTANCE_URL = "https://localhost:5678"
90+
N8N_MCP_TOKEN = "YOUR_N8N_MCP_TOKEN"
91+
92+
root_agent = Agent(
93+
model="gemini-2.5-pro",
94+
name="n8n_agent",
95+
instruction="Help users manage and execute workflows in n8n",
96+
tools=[
97+
McpToolset(
98+
connection_params=StreamableHTTPServerParams(
99+
url=f"{N8N_INSTANCE_URL}/mcp-server/http",
100+
headers={
101+
"Authorization": f"Bearer {N8N_MCP_TOKEN}",
102+
},
103+
),
104+
)
105+
],
106+
)
107+
```
108+
109+
## Available tools
110+
111+
Tool | Description
112+
---- | -----------
113+
`search_workflows` | Search for available workflows
114+
`execute_workflow` | Execute a specific workflow
115+
`get_workflow_details` | Retrieve metadata and schema information for a workflow
116+
117+
## Configuration
118+
119+
To make workflows accessible to your agent, they must meet the following
120+
criteria:
121+
122+
- **Be Active**: The workflow must be activated in n8n.
123+
124+
- **Supported Trigger**: Contain a Webhook, Schedule, Chat, or Form trigger
125+
node.
126+
127+
- **Enabled for MCP**: You must toggle "Available in MCP" in the workflow
128+
settings or select "Enable MCP access" from the workflow card menu.
129+
130+
## Additional resources
131+
132+
- [n8n MCP Server Documentation](https://docs.n8n.io/advanced-ai/accessing-n8n-mcp-server/)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ nav:
225225
- GitLab: tools/third-party/gitlab.md
226226
- Hugging Face: tools/third-party/hugging-face.md
227227
- Linear: tools/third-party/linear.md
228+
- n8n: tools/third-party/n8n.md
228229
- Notion: tools/third-party/notion.md
229230
- Qdrant: tools/third-party/qdrant.md
230231
- ScrapeGraphAI: tools/third-party/scrapegraphai.md

0 commit comments

Comments
 (0)