使用GPT-5 nano和Google Sheets抓取网站并回答问题
高级
这是一个Market Research, Multimodal AI领域的自动化工作流,包含 44 个节点。主要使用 If, Set, Xml, Code, Markdown 等节点。 使用GPT-5 nano和Google Sheets抓取网站并回答问题
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
使用的节点 (44)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "3dd9efe937707b07af3ede5b46321ec0e2a9e49d7ef201e274c4c4aa1a4615a6",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "05174bb2-efd5-4de8-9e17-26c2a85eff06",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-2432,
272
],
"parameters": {
"text": "={{ $node[\"Chat web\"].json[\"chatInput\"] }}",
"options": {
"systemMessage": "Actuas como una página web, mediante la tool sheet tienes acceso a toda la página web y todo lo que te pida el usaurio puedes consultarlo allí, responde el usuario en base a la info de allí"
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "6dc738b3-4ebe-4f5b-b8b3-decf9ce15e70",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-2496,
480
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5-nano",
"cachedResultName": "gpt-5-nano"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "dfSo8Emt7Jfhxkoj",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "0461df33-2d2f-42e2-a0d3-288bd78275f1",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-2336,
480
],
"parameters": {
"contextWindowLength": 50
},
"typeVersion": 1.3
},
{
"id": "fdcce6e6-f00f-4f84-ac6e-2e181452d3ac",
"name": "获取Google Sheets中的行数据",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
-1968,
464
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8/edit#gid=0",
"cachedResultName": "Web"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8/edit?usp=drivesdk",
"cachedResultName": "Web chat Workflow"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "wVh07BIjSJqZc11s",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "621aa928-83c5-48a4-8488-67c58fa1aec8",
"name": "如果",
"type": "n8n-nodes-base.if",
"position": [
-3376,
560
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "0adf46cd-5ca1-418e-a8b8-0571240e0efb",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json['Data schema'] }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "8df9234a-85ad-45b4-bc17-ad64edaab08a",
"name": "映射站点地图",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
-1536,
736
],
"parameters": {
"url": "={{ $json.sitemapUrl }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "User-Agent",
"value": "={{ $json.userAgent }}"
},
{
"name": "Accept-Language",
"value": "es-ES,es;q=0.9,en;q=0.8"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, br"
},
{
"name": "Referer",
"value": "https://www.google.com/"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Upgrade-Insecure-Requests",
"value": "1"
},
{
"name": "Sec-Fetch-Dest",
"value": "document"
},
{
"name": "Sec-Fetch-Mode",
"value": "navigate"
},
{
"name": "DNT",
"value": "1"
},
{
"name": "Accept",
"value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "0d18ebca-52f3-46ed-934c-44c9bad53dab",
"name": "XML1",
"type": "n8n-nodes-base.xml",
"position": [
-1088,
960
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "39127cf7-f627-4fca-b1b7-c51b3656947d",
"name": "UA轮换1",
"type": "n8n-nodes-base.code",
"position": [
-2160,
736
],
"parameters": {
"jsCode": "const userAgents = [\n // Escritorio - Windows\n \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36\",\n \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0\",\n \"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36\",\n\n // Escritorio - Mac\n \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15\",\n \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36\",\n\n // Móvil - Android\n \"Mozilla/5.0 (Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36\",\n \"Mozilla/5.0 (Linux; Android 9; Mi 9T Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36\",\n\n // Móvil - iPhone\n \"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1\",\n \"Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Mobile/15E148 Safari/604.1\"\n];\n\n// Escoge uno aleatorio\nconst randomUA = userAgents[Math.floor(Math.random() * userAgents.length)];\n\nreturn [\n {\n json: {\n userAgent: randomUA\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "4260d45a-8705-483a-b17f-58211512ba59",
"name": "请求错误",
"type": "n8n-nodes-base.stopAndError",
"position": [
-1712,
592
],
"parameters": {
"errorMessage": "URL mal introducida, debes introducir con el siguiente formato: ejemplo.com"
},
"typeVersion": 1
},
{
"id": "59d0fe0a-9e27-4755-ac23-f46fa6d2aa95",
"name": "站点地图错误",
"type": "n8n-nodes-base.stopAndError",
"position": [
-1088,
528
],
"parameters": {
"errorMessage": "Sitemap no encontrado o acceso bloqueadp"
},
"executeOnce": false,
"typeVersion": 1
},
{
"id": "0526a778-8d63-4dcc-9815-a002ffd70a7f",
"name": "请求robots文件",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
-1920,
736
],
"parameters": {
"url": "={{ $node[\"AI Agent1\"].json[\"output\"][\"URL\"] }}/robots.txt",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "User-Agent",
"value": "={{ $json.userAgent }}"
},
{
"name": "Accept-Language",
"value": "es-ES,es;q=0.9,en;q=0.8"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, br"
},
{
"name": "Referer",
"value": "https://www.google.com/"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Upgrade-Insecure-Requests",
"value": "1"
},
{
"name": "Sec-Fetch-Dest",
"value": "document"
},
{
"name": "Sec-Fetch-Mode",
"value": "navigate"
},
{
"name": "DNT",
"value": "1"
},
{
"name": "Accept",
"value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "5948d577-4aea-4394-9b20-687f44efe5c8",
"name": "提取站点地图URL",
"type": "n8n-nodes-base.code",
"position": [
-1712,
736
],
"parameters": {
"jsCode": "// Simulación: contenido del robots.txt como string, en n8n será $input o $json dependiendo de tu configuración\nconst robotsTxtContent = $input.first().json.data || \"\"; // Cambia esto por la variable correcta en n8n\n\n// Función para extraer URL del sitemap\nfunction extractSitemapUrl(robotsTxt) {\n // Buscamos línea que empiece con \"Sitemap:\" (ignorando mayúsculas y espacios)\n const lines = robotsTxt.split(/\\r?\\n/);\n for (const line of lines) {\n const match = line.match(/^\\s*Sitemap:\\s*(.+)$/i);\n if (match) {\n return match[1].trim();\n }\n }\n return null; // No encontrado\n}\n\nconst sitemapUrl = extractSitemapUrl(robotsTxtContent);\n\n// Devolver JSON con la URL del sitemap (o null si no hay)\nreturn [{ json: { sitemapUrl } }];"
},
"typeVersion": 2
},
{
"id": "c12d6ae7-23ee-4f7a-9a33-7e43d1e475b9",
"name": "选项设置",
"type": "n8n-nodes-base.set",
"position": [
-2400,
736
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "71b9ad22-d418-4fff-92bb-dafd0818575d",
"name": "scan_pages",
"type": "boolean",
"value": true
},
{
"id": "42483a05-34f0-4cef-b404-dae43a7bee22",
"name": "scan_posts",
"type": "boolean",
"value": false
},
{
"id": "00a5ed31-dd44-4f9f-97f1-7aa4fe636afd",
"name": "category",
"type": "boolean",
"value": false
},
{
"id": "a2b0930f-8a9b-4f78-8d20-466366853b55",
"name": "tags",
"type": "boolean",
"value": false
}
]
}
},
"typeVersion": 3.4
},
{
"id": "2ab278f9-2904-4b6c-a2a3-6a703c0bb3ae",
"name": "AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-3024,
736
],
"parameters": {
"text": "={{ $node[\"Chat web\"].json[\"chatInput\"] }}",
"options": {
"systemMessage": "Responde en formato JSON, el url si lo es, si no lo es pon cualquier valor y con una boolean que se indica respondiendo si es url o no (true or false)"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "afdbed61-346e-44a6-aa69-23a2b7ecf553",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-3024,
944
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5-nano",
"cachedResultName": "gpt-5-nano"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "dfSo8Emt7Jfhxkoj",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "175a77cd-bd0a-4849-8c9b-d36b4ddcecd9",
"name": "网页聊天",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-3776,
560
],
"webhookId": "01764d18-dae5-4dff-8e99-cb90682e9187",
"parameters": {
"public": true,
"options": {
"responseMode": "responseNodes"
},
"authentication": "basicAuth"
},
"credentials": {
"httpBasicAuth": {
"id": "PkymFgJgUnBzIwMu",
"name": "Unnamed credential"
}
},
"typeVersion": 1.3
},
{
"id": "16ef0fa6-4259-43bf-b74f-3dc70d4b54e3",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-2880,
944
],
"parameters": {
"jsonSchemaExample": "{\n \"URL\": \"example.com\",\n \"URL_bool\":true\n}"
},
"typeVersion": 1.3
},
{
"id": "15992fbe-4ee5-4630-a377-f1b8d21ebc1b",
"name": "条件判断1",
"type": "n8n-nodes-base.if",
"position": [
-2640,
752
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3851cb51-a282-4388-b4f6-1c1f68e8c7c5",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.output.URL_bool }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "ab8d3076-4420-48ef-b8fa-e25adbbd11e2",
"name": "响应聊天",
"type": "@n8n/n8n-nodes-langchain.chat",
"position": [
-2400,
928
],
"parameters": {
"message": "Debes introducir una URL válida ejemplo: https://google.es",
"options": {}
},
"typeVersion": 1
},
{
"id": "c5a8dd49-3a82-45c7-a139-b30b4cc21e05",
"name": "响应聊天1",
"type": "@n8n/n8n-nodes-langchain.chat",
"position": [
-2080,
272
],
"parameters": {
"message": "={{ $json.output }}",
"options": {}
},
"typeVersion": 1
},
{
"id": "d665823a-b40a-45a5-ac12-0a789c1b8ecd",
"name": "向模型发送消息",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-3024,
1280
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "GPT-4O"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "=De aquí saca y devuelve en formato JSON, los siguientes urls de los sitemap que sean true: \n\nPages: {{ $('OPTIONS').item.json.scan_pages }}\n\nPosts: {{ $('OPTIONS').item.json.scan_posts }}\n\nCategorias: {{ $('OPTIONS').item.json.category }}\n\nTags: {{ $('OPTIONS').item.json.tags }}\n\nSalida:\n\n{\n\"sitemap_page\":\"https://...\",\n\"sitemap_posts\":\"https://\"\n}"
},
{
"content": "=Sitemap: \n{{ $json.sitemapindex.sitemap[0].loc }}\n\n{{ $json.sitemapindex.sitemap[1].loc }}\n\n{{ $json.sitemapindex.sitemap[2].loc }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "dfSo8Emt7Jfhxkoj",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "d71fbfb6-3e9b-427b-afe3-6fd77ff77ede",
"name": "XML",
"type": "n8n-nodes-base.xml",
"position": [
-2480,
1280
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "6578bcc5-b412-46bf-88d5-8b285372e9b9",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-1856,
1280
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "25c7cbaf-7eb9-4e71-a488-b6d16242d324",
"name": "向模型发送消息1",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-1200,
1408
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-5-nano",
"cachedResultName": "GPT-5-NANO"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "El usuario te mandara el contenido de la página web, tu mision es sacar un resumen de la página web, idioma de la págn, h1, enlaces internos (no imagenes ni css ni js) y enlaces externos y añadirlos mediante la tool sheet a la db"
},
{
"content": "=URL: {{ $('Split URLs').item.json.urls }}\n\n{{ $json.data }}"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "dfSo8Emt7Jfhxkoj",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "6fb7c3fa-7851-49cd-8d0b-01df74a80f35",
"name": "在Google Sheets中添加行",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
-1056,
1648
],
"parameters": {
"columns": {
"value": {
"Lang": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Lang', ``, 'string') }}",
"Page URL": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Page_URL', ``, 'string') }}",
"External URLs": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('External_URLs', ``, 'string') }}",
"Internal URLs": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Internal_URLs', ``, 'string') }}",
"Summary Content": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary_Content', ``, 'string') }}",
"H1 and hierarchy": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('H1_and_hierarchy', ``, 'string') }}"
},
"schema": [
{
"id": "Page URL",
"type": "string",
"display": true,
"required": false,
"displayName": "Page URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content text",
"type": "string",
"display": true,
"required": false,
"displayName": "Content text",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Lang",
"type": "string",
"display": true,
"required": false,
"displayName": "Lang",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "H1 and hierarchy",
"type": "string",
"display": true,
"required": false,
"displayName": "H1 and hierarchy",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "External URLs",
"type": "string",
"display": true,
"required": false,
"displayName": "External URLs",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Internal URLs",
"type": "string",
"display": true,
"required": false,
"displayName": "Internal URLs",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary Content",
"type": "string",
"display": true,
"required": false,
"displayName": "Summary Content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Data schema",
"type": "string",
"display": true,
"required": false,
"displayName": "Data schema",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8/edit#gid=0",
"cachedResultName": "Web"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8/edit?usp=drivesdk",
"cachedResultName": "Web chat Workflow"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "wVh07BIjSJqZc11s",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "9a5d11a2-0fc8-48a1-8fa0-c2f53fb49b54",
"name": "完成",
"type": "n8n-nodes-base.googleSheets",
"position": [
-1616,
1168
],
"parameters": {
"columns": {
"value": {
"Data schema": "={{true}}"
},
"schema": [
{
"id": "Page URL",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Page URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content text",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Content text",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Lang",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Lang",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "H1 and hierarchy",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "H1 and hierarchy",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "External URLs",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "External URLs",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Internal URLs",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Internal URLs",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary Content",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Summary Content",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Data schema",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Data schema",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Data schema"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8/edit#gid=0",
"cachedResultName": "Web"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8/edit?usp=drivesdk",
"cachedResultName": "Web chat Workflow"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "wVh07BIjSJqZc11s",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "c371c8db-e752-48fa-999d-4813aeb13f38",
"name": "HTTP请求2",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
-2176,
480
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "40169b8e-5948-4422-98d9-4bca87ccab73",
"name": "合并",
"type": "n8n-nodes-base.code",
"position": [
-2272,
1280
],
"parameters": {
"jsCode": "// Obtenemos el array de URLs del JSON\nconst urlsArray = $input.first().json.urlset.url;\n\n// Creamos un objeto donde cada clave es \"url 1\", \"url 2\", etc.\nconst result = {};\nurlsArray.forEach((item, index) => {\n if (item.loc) {\n result[`url ${index + 1}`] = item.loc;\n }\n});\n\n// Devolvemos el objeto\nreturn [\n {\n json: {\n urls: result\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "5d98fe9e-890c-4c9f-81c8-309cc23dc8af",
"name": "分割URL",
"type": "n8n-nodes-base.splitOut",
"position": [
-2064,
1280
],
"parameters": {
"options": {},
"fieldToSplitOut": "urls"
},
"typeVersion": 1
},
{
"id": "98abaa2b-ddbc-4c04-830e-d7112a6a57e2",
"name": "请求URL",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
-1616,
1408
],
"parameters": {
"url": "={{ $('Split URLs').item.json.urls }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "User-Agent",
"value": "={{ $json.userAgent }}"
},
{
"name": "Accept-Language",
"value": "es-ES,es;q=0.9,en;q=0.8"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, br"
},
{
"name": "Referer",
"value": "https://www.google.com/"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Upgrade-Insecure-Requests",
"value": "1"
},
{
"name": "Sec-Fetch-Dest",
"value": "document"
},
{
"name": "Sec-Fetch-Mode",
"value": "navigate"
},
{
"name": "DNT",
"value": "1"
},
{
"name": "Accept",
"value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "71d974a6-4f60-4573-be09-7cbb09502fa3",
"name": "HTML转Markdown",
"type": "n8n-nodes-base.markdown",
"position": [
-1408,
1408
],
"parameters": {
"html": "={{ $json.data }}",
"options": {}
},
"typeVersion": 1
},
{
"id": "f076a729-8f40-4a3b-ad32-83837964c42c",
"name": "映射站点地图集",
"type": "n8n-nodes-base.httpRequest",
"position": [
-2672,
1280
],
"parameters": {
"url": "={{ $json.message.content.sitemap_page }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Accept-Language",
"value": "es-ES,es;q=0.9,en;q=0.8"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, br"
},
{
"name": "Referer",
"value": "https://www.google.com/"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Upgrade-Insecure-Requests",
"value": "1"
},
{
"name": "Sec-Fetch-Dest",
"value": "document"
},
{
"name": "Sec-Fetch-Mode",
"value": "navigate"
},
{
"name": "DNT",
"value": "1"
},
{
"name": "Accept",
"value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "bca3322d-bc2e-4932-a5f2-a2e9548a8aef",
"name": "获取数据模式",
"type": "n8n-nodes-base.googleSheets",
"maxTries": 5,
"position": [
-3568,
560
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "={{ true }}",
"lookupColumn": "Data schema"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8/edit#gid=0",
"cachedResultName": "Web"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/112qqkm4omdSzDT2jI17IQAxYvGjKuGlYxj6XytDA5L8/edit?usp=drivesdk",
"cachedResultName": "Web chat Workflow"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "wVh07BIjSJqZc11s",
"name": "Google Sheets account"
}
},
"retryOnFail": true,
"typeVersion": 4.6,
"alwaysOutputData": true,
"waitBetweenTries": 3000
},
{
"id": "d051d2f3-cc65-4cb8-8a67-90d7df0dda08",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3568,
736
],
"parameters": {
"width": 256,
"height": 176,
"content": "## 文档示例URL"
},
"typeVersion": 1
},
{
"id": "2ffd406b-1b1b-44d6-be7e-5bbdf73ad5d0",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3776,
240
],
"parameters": {
"color": 5,
"width": 496,
"height": 288,
"content": "## 概述"
},
"typeVersion": 1
},
{
"id": "303ec015-8a82-4092-9dd9-46bb7658a1d3",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-864,
32
],
"parameters": {
"width": 992,
"height": 1104,
"content": "## 1) 聊天触发器与模式检查"
},
"typeVersion": 1
},
{
"id": "f37eac9a-5e47-45a3-a1ba-e65ebb312571",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3968,
560
],
"parameters": {
"width": 150,
"height": 96,
"content": "# P1"
},
"typeVersion": 1
},
{
"id": "8a2b47b5-dd9c-4f20-b76f-437446d0d0c6",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2720,
288
],
"parameters": {
"width": 166,
"height": 272,
"content": ""
},
"typeVersion": 1
},
{
"id": "d63fd3cc-2966-4460-8de0-8b871d6f2e78",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3248,
736
],
"parameters": {
"width": 150,
"height": 320,
"content": ""
},
"typeVersion": 1
},
{
"id": "059d0c29-58d7-4b75-9ec4-89d8b1b8e54b",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-848,
1200
],
"parameters": {
"width": 992,
"height": 1248,
"content": "## 4) 选择特定的站点地图(页面)"
},
"typeVersion": 1
},
{
"id": "33d198cc-058e-4935-9e49-adc77baf654b",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2144,
912
],
"parameters": {
"color": 3,
"width": 608,
"height": 192,
"content": "## 每种情况的用户体验"
},
"typeVersion": 1
},
{
"id": "670ecb31-9a8d-4d13-aa94-066463f91e6a",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3248,
1136
],
"parameters": {
"width": 150,
"height": 320,
"content": ""
},
"typeVersion": 1
},
{
"id": "c0bffbee-cf0d-4abf-99a0-dbbc5347c08d",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2096,
1440
],
"parameters": {
"width": 150,
"height": 320,
"content": ""
},
"typeVersion": 1
},
{
"id": "de0a9316-6130-4272-bce1-db37039e9c3d",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3968,
720
],
"parameters": {
"color": 5,
"width": 272,
"height": 144,
"content": "## 由OXSR开发的节点"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"If": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
],
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "OPTIONS",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Chat",
"type": "main",
"index": 0
}
]
]
},
"XML": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"XML1": {
"main": [
[
{
"node": "Message a model",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Split URLs",
"type": "main",
"index": 0
}
]
]
},
"OPTIONS": {
"main": [
[
{
"node": "UA Rotativo1",
"type": "main",
"index": 0
}
]
]
},
"Req URL": {
"main": [
[
{
"node": "HTML to Markdown",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Respond to Chat1",
"type": "main",
"index": 0
}
]
]
},
"Chat web": {
"main": [
[
{
"node": "Get data schema",
"type": "main",
"index": 0
}
]
]
},
"AI Agent1": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"Req robots": {
"main": [
[
{
"node": "extract sitemap url",
"type": "main",
"index": 0
}
],
[
{
"node": "Req Error",
"type": "main",
"index": 0
}
]
]
},
"Split URLs": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"UA Rotativo1": {
"main": [
[
{
"node": "Req robots",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request2": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Maping Sitemap": {
"main": [
[
{
"node": "XML1",
"type": "main",
"index": 0
}
],
[
{
"node": "Sitemap Error",
"type": "main",
"index": 0
}
]
]
},
"Get data schema": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Complete",
"type": "main",
"index": 0
}
],
[
{
"node": "Req URL",
"type": "main",
"index": 0
}
]
]
},
"Maping Sitemaps": {
"main": [
[
{
"node": "XML",
"type": "main",
"index": 0
}
]
]
},
"Message a model": {
"main": [
[
{
"node": "Maping Sitemaps",
"type": "main",
"index": 0
}
]
]
},
"HTML to Markdown": {
"main": [
[
{
"node": "Message a model1",
"type": "main",
"index": 0
}
]
]
},
"Message a model1": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"extract sitemap url": {
"main": [
[
{
"node": "Maping Sitemap",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent1",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Append row in sheet in Google Sheets": {
"ai_tool": [
[
{
"node": "Message a model1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get row(s) in sheet in Google Sheets": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 市场调研, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
基于 YouTube 视频的自主博客发布
使用 ChatGPT、Sheets、Apify、Pexels 和 WordPress 从 YouTube 视频自主发布博客
If
Set
Code
+18
80 节点Oriol Seguí
内容创作
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
1. 播放列表详情设置机器人副本
使用 Suno、GPT-4、Runway 和 Creatomate 创建 AI 生成的 YouTube 音乐播放列表
If
Set
Code
+22
203 节点Joseph
内容创作
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
内容创作
使用GPT-5 nano和Yoast SEO自动化WordPress SEO优化
使用GPT-5 nano和Yoast SEO自动化WordPress SEO优化
Set
Code
Gmail
+11
35 节点Oriol Seguí
杂项
深度研究智能体
深度研究智能体 - 自动化研究与 Notion 报告生成器
Set
Code
Filter
+17
43 节点Aziz B
市场调研