提示 #1:测试 n8n 子工作流
中级
这是一个Building Blocks、AI领域的自动化工作流,包含 6 个节点。主要使用 If、Set、ManualTrigger、ExecuteWorkflowTrigger 等节点,结合人工智能技术实现智能自动化。 提示 #1:测试 n8n 子工作流
前置要求
- •AI 服务 API Key(如 OpenAI、Anthropic 等)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "VdaeEvTKSXCbdvaE",
"meta": {
"instanceId": "8981479cb588889c05b145eaed421551d37a4fff11ab279d3f4744a6577c6002"
},
"name": "提示 #1:测试n8n子工作流",
"tags": [],
"nodes": [
{
"id": "40b39083-5786-47f8-b46f-31617d3c1e18",
"name": "当被其他工作流执行时",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
220,
200
],
"parameters": {
"workflowInputs": {
"values": [
{
"name": "color"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "1b8c3f08-b677-4a2a-8cc4-1a9ec1d2a979",
"name": "当点击“执行工作流”时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
0
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0ccdd511-857a-4173-9dd3-9dcbafaaf8d3",
"name": "测试输入",
"type": "n8n-nodes-base.set",
"position": [
220,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ba91ff49-9785-4bdb-8285-32b312ba91a0",
"name": "color",
"type": "string",
"value": "blue"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4da32de9-6b05-4a26-9d67-eae677dbcbfe",
"name": "合并输入",
"type": "n8n-nodes-base.set",
"position": [
440,
100
],
"parameters": {
"options": {},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "e5cdecb7-1e03-4010-8cdb-ddf39220b2fb",
"name": "如果",
"type": "n8n-nodes-base.if",
"position": [
660,
100
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "15a5d561-e439-43b0-a11b-b969aee65d72",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Combine Input').item.json.color }}",
"rightValue": "blue"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d7c3efc5-c495-4811-8b47-7681c67068a3",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
-180
],
"parameters": {
"width": 400,
"height": 120,
"content": "## 提示 #1:测试n8n子工作流"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d6190099-dc63-414d-b0e6-288416a78c62",
"connections": {
"Test Input": {
"main": [
[
{
"node": "Combine Input",
"type": "main",
"index": 0
}
]
]
},
"Combine Input": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Combine Input",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Test Input",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个中级难度的工作流,适用于Building Blocks、AI等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用 Anthropic Claude API 批量处理提示
使用 Anthropic Claude API 批量处理提示
If
Set
Code
+13
39 节点Greg Evseev
Building Blocks
构建自定义Qdrant向量存储MCP服务器
构建自定义Qdrant向量存储MCP服务器
If
Set
Code
+14
44 节点Jimleuk
Building Blocks
将邮件相关提问转换为SQL查询并执行
邮件助手:使用Phi4-mini和PostgreSQL将自然语言转换为SQL查询
If
Set
Merge
+10
26 节点Alfonso Corretti
Building Blocks
使用Azure OpenAI批量API并行处理多个提示
使用Azure OpenAI批量API并行处理多个提示
If
Set
Code
+14
53 节点Greg Evseev
Building Blocks
基于 Bright Data MCP 的 AI Telegram 数据提取机器人
集成 Bright Data MCP 的 AI Telegram 数据提取机器人
If
N8n
Wait
+11
21 节点Cyril Nicko Gaspar
Engineering
YouTube Shorts + 自定义MCP服务器
使用OpenAI通过MCP服务器从Reddit内容自动生成YouTube Shorts
If
Set
Wait
+10
43 节点jolonbankey
Design