使用GPT-4.1 mini将自然语言转换为网络搜索并记录到Google Sheets
中级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 14 个节点。主要使用 Webhook, HttpRequest, GoogleSheets, Agent, HttpRequestTool 等节点。 使用GPT-4.1 mini将自然语言转换为网络搜索并记录到Google Sheets
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
使用的节点 (14)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "0a25db4fd0692af64b58f35e01611f2ef0b5bb9d6654c57ef3741021e7d8cc11",
"templateId": "6343",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "d324309d-a8e6-49a7-9aba-6539822ccc09",
"name": "站点",
"type": "n8n-nodes-base.httpRequest",
"position": [
640,
256
],
"parameters": {
"url": "https://api.firecrawl.dev/v1/search",
"method": "POST",
"options": {},
"jsonBody": "{\n \"query\": \"nate herk site:www.geeky-gadgets.com\",\n \"limit\": 5\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{}
]
}
},
"typeVersion": 4.2
},
{
"id": "0aea3a14-37ac-46c6-8e8c-a12c3750e801",
"name": "在URL中",
"type": "n8n-nodes-base.httpRequest",
"position": [
640,
448
],
"parameters": {
"url": "https://api.firecrawl.dev/v1/search",
"method": "POST",
"options": {},
"jsonBody": "{\n \"query\": \"nate herk inurl:skool\",\n \"limit\": 5\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{}
]
}
},
"typeVersion": 4.2
},
{
"id": "f6c6becf-a6de-4523-846b-9ec51d485a2f",
"name": "排除",
"type": "n8n-nodes-base.httpRequest",
"position": [
864,
256
],
"parameters": {
"url": "https://api.firecrawl.dev/v1/search",
"method": "POST",
"options": {},
"jsonBody": "{\n \"query\": \"nate herk -inurl:skool\",\n \"limit\": 6\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{}
]
}
},
"typeVersion": 4.2
},
{
"id": "8107f822-b505-4158-8c13-8f1bf7774db0",
"name": "专业版",
"type": "n8n-nodes-base.httpRequest",
"position": [
864,
448
],
"parameters": {
"url": "https://api.firecrawl.dev/v1/search",
"method": "POST",
"options": {},
"jsonBody": "{\n \"query\": \"Nate Herk site:youtube.com -shorts intitle:automation\",\n \"limit\": 5\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{}
]
}
},
"typeVersion": 4.2
},
{
"id": "d0a5315a-1d4a-41a7-b68c-ab31686370e1",
"name": "GPT 4.1 mini",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
304,
576
],
"parameters": {
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "d5XqPDl5wyBTf7S8",
"name": "OpenRouter account"
}
},
"typeVersion": 1
},
{
"id": "19753a83-34d3-4d61-a1ab-4d7d90f5245d",
"name": "Firecrawl 搜索",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
432,
576
],
"parameters": {
"url": "https://api.firecrawl.dev/v1/search",
"method": "POST",
"options": {},
"jsonBody": "={\n \"query\": \"{{$fromAI(\"searchQuery\")}}\",\n \"limit\": {{$fromAI(\"limit\",\"the number of search results requested\", number)}},\n \"scrapeOptions\": {\n \"formats\": [\"markdown\", \"screenshot@fullPage\"]}\n}",
"sendBody": true,
"specifyBody": "json",
"toolDescription": "Use this tool to search the internet"
},
"typeVersion": 4.2
},
{
"id": "34fa76be-ef2a-4962-9ff1-9d5268525e5f",
"name": "搜索智能体",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
288,
352
],
"parameters": {
"options": {
"systemMessage": "=# Overview\nYou are a Firecrawl Search Query Generator Agent.\n\nYou have access to a tool called FireCrawl Search.\n\nYour job is to:\n1. Convert natural language instructions into a properly formatted Firecrawl query string using supported operators.\n2. Send that query — along with a `limit` parameter — to the **FireCrawl Search** tool.\n\n## Query Construction Rules:\n\nUse the following rules to transform user input:\n\n- If the user specifies an exact phrase \n → `Nate Herk`\n\n- To exclude terms or domains, prefix them with `-` \n → `-linkedin`, `-site:facebook.com`\n\n- If the user wants to search within a specific site, use `site:` \n → `site:youtube.com`\n\n- If the user wants a word in the URL, use `inurl:` \n → `inurl:nateherk`\n\n- If the user wants multiple words in the URL, use `allinurl:` \n → `allinurl:nate herk agent`\n\n- If the user wants a word in the title of the page, use `intitle:` \n → `intitle:automation`\n\n- If the user wants multiple words in the title, use `allintitle:` \n → `allintitle:ai agent tutorial`\n\n- If the user wants results related to a domain, use `related:` \n → `related:truehorizonai.com`\n\n\n## Tool Usage Instructions:\n\nAlways call the **FireCrawls Search** tool with:\n- `query`: the final constructed query string \n- `limit`: the number of results the user requested\n\nIf the user does **not specify a limit**, default to: \n→ `limit: 5`\n\n## Output\n\nAlways return all of the important information for each item that the tool gives you. The the title, the URL, the results, etc. \n\nFor each 'data' object that is returned in the results, output every field that lives in that object.\n\n## Examples:\n\n**Input:** Search the internet for Nate Herk \n**Action:** Call FireCrawls Search with: \n```json\n{\n \"query\": Nate Herk,\n \"limit\": 5\n}\n```\n\n**Input:** Find pages with AI agent in the title from YouTube, show me 10 \n**Action:** \n```json\n{\n \"query\": intitle:AI agent site:youtube.com,\n \"limit\": 10\n}\n```\n\n**Input:** Show me results that mention Nate Herk but exclude LinkedIn \n**Action:** \n```json\n{\n \"query\": Nate Herk -site:linkedin.com,\n \"limit\": 5\n}\n```\n"
}
},
"typeVersion": 2
},
{
"id": "0cf2ace2-d00e-4234-8ff1-3118951db009",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
64,
352
],
"webhookId": "0d916768-023f-4d0e-8b76-4cbd5ffa07ee",
"parameters": {
"path": "0d916768-023f-4d0e-8b76-4cbd5ffa07ee",
"options": {}
},
"typeVersion": 2.1
},
{
"id": "a59522c9-c0af-42cf-ba29-c517482549ba",
"name": "在表格中追加行",
"type": "n8n-nodes-base.googleSheets",
"position": [
1088,
352
],
"parameters": {
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1EAA7t2lal9462X_CHmfZQ7LbAVsbrrkpGN1hpDI0p8o/edit#gid=0",
"cachedResultName": "Tabellenblatt1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1EAA7t2lal9462X_CHmfZQ7LbAVsbrrkpGN1hpDI0p8o",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1EAA7t2lal9462X_CHmfZQ7LbAVsbrrkpGN1hpDI0p8o/edit?usp=drivesdk",
"cachedResultName": "Founders Academy Waitlist"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "cjPjcwa3RdiMAu79",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "e16d710a-2d50-4209-b2b3-be66df110e09",
"name": "响应 Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1312,
352
],
"parameters": {
"options": {}
},
"typeVersion": 1.4
},
{
"id": "9c0850a0-d487-4be7-817f-89dc4722bb88",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
176
],
"parameters": {
"color": 4,
"width": 520,
"height": 140,
"content": "## 步骤 1 · 入口与编排"
},
"typeVersion": 1
},
{
"id": "473b66f3-9de2-4484-bb12-9f6e3f991c04",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
16
],
"parameters": {
"color": 5,
"width": 280,
"height": 268,
"content": "## 步骤 2 · 智能体与工具"
},
"typeVersion": 1
},
{
"id": "19065dd3-d693-4ed5-9d98-0a13cfe02d82",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
624,
0
],
"parameters": {
"color": 6,
"width": 432,
"height": 218,
"content": "## 步骤 3 · 定向查询 (HTTP)"
},
"typeVersion": 1
},
{
"id": "826d9e61-6e3f-4ea4-a5b1-fdc2b754e116",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1088,
144
],
"parameters": {
"color": 7,
"width": 520,
"height": 140,
"content": "## 步骤 4 · 持久化与响应"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Pro": {
"main": [
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Site": {
"main": [
[
{
"node": "Exclusion",
"type": "main",
"index": 0
}
]
]
},
"In URL": {
"main": [
[
{
"node": "Pro",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Search Agent",
"type": "main",
"index": 0
}
]
]
},
"Exclusion": {
"main": [
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"GPT 4.1 mini": {
"ai_languageModel": [
[
{
"node": "Search Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Search Agent": {
"main": [
[
{
"node": "Site",
"type": "main",
"index": 0
},
{
"node": "In URL",
"type": "main",
"index": 0
}
]
]
},
"Firecrawl Search": {
"ai_tool": [
[
{
"node": "Search Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Append row in sheet": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
自动化潜在客户呼叫:VAPI、Google Sheets记录与日历预约
自动化潜在客户呼叫:VAPI、Google Sheets记录与日历预约
Set
Code
Webhook
+7
13 节点Meak
内容创作
使用Nano Banana + GPT-5自动化图片编辑和IG发布
通过Nano Banana和GPT-5自动化图片编辑和Instagram发布
If
Wait
Http Request
+5
19 节点Meak
内容创作
工作流目的与关键工具
工作流目的与关键工具:Claude 3.7模型规格
If
Set
Gmail
+10
23 节点Meak
内容创作
提取YouTube字幕
使用AI和Google Sheets将YouTube转录转换为内容资产
Code
Webhook
Http Request
+6
23 节点Gerald Denor
内容创作
WordPress SEO发布器
集成Anthropic AI、Google Docs和媒体自动化的WordPress SEO发布器
Set
Code
Merge
+12
41 节点Cong Nguyen
内容创作
AI线索评分与路由(Google Gemini、Sheets和Slack通知)
AI线索评分与路由(Google Gemini、Sheets和Slack通知)
Set
Merge
Slack
+5
13 节点Meak
内容创作