Files
SpiderBrand/Website Craw IA.json
T
2026-05-09 17:46:38 +00:00

323 lines
9.6 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "Website Craw IA v4",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
64,
0
],
"id": "e4051790-d93e-4048-9d8e-64de8b644f57",
"name": "When clicking Execute workflow"
},
{
"parameters": {},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
880,
0
],
"id": "3ec97de7-159c-46e6-af26-267d52f14d57",
"name": "Wait",
"webhookId": "1ef26c6f-55e3-4f51-bab5-6bb1e4b85fb8"
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={\n\"result\": {{ $('Get LLM Crawl').item.json.result.extracted_content }}\n}",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1632,
-16
],
"id": "5d269e95-2e32-456b-8d07-54b279a0f543",
"name": "LLM Result"
},
{
"parameters": {
"url": "=https://evo-crwal4ai.5lbnb4.easypanel.host/task/{{ $json.task_id }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1056,
0
],
"id": "e1d5e1dc-27ca-4617-bc2d-eafa3292db17",
"name": "Get LLM Crawl",
"credentials": {
"httpBasicAuth": {
"id": "kSyyvvNaOBuA00C4",
"name": "crawl4aiserver"
},
"httpHeaderAuth": {
"id": "VLM9roYC9zcTGJsa",
"name": "panel"
}
}
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={\n \"task_id\": \"{{ $('Markdown Crawl Request').item.json.task_id }}\", \"status\": \"{{ $json.status }}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1264,
0
],
"id": "7b604366-9af1-417a-b724-f039e574cc19",
"name": "LLM TID Field"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "aad7f793-d74c-4f00-8d29-11b4782b43c8",
"leftValue": "={{ $json.status }}",
"rightValue": "pending",
"operator": {
"type": "string",
"operation": "notEquals"
}
},
{
"id": "c1ca239e-8ba0-447f-bc6e-bdbc83273c9f",
"leftValue": "={{ $json.status }}",
"rightValue": "processing",
"operator": {
"type": "string",
"operation": "notEquals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1472,
0
],
"id": "4fef42a2-3682-4ca4-b2c9-4205471aa1ce",
"name": "LLM if In Process"
},
{
"parameters": {
"method": "POST",
"url": "https://evo-crwal4ai.5lbnb4.easypanel.host/crawl",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"urls\": \"{{ $json.loc }}\",\n \"crawler_params\": {\n \"headless\": true\n },\n \"extraction_config\": {\n \"type\": \"llm\",\n \"params\": {\n \"llm_config\": {\n \"provider\": \"openai/gpt4o-mini\"\n },\n \"schema\": {\n \"title\": \"ProductData\",\n \"type\": \"object\",\n \"properties\": {\n \"title\": { \"type\": \"string\", \"description\": \"Product name (page title).\" },\n \"sku\": { \"type\": \"string\", \"description\": \"SKU/Referencia: use Product.sku/mpn or 'Referencia:' text on page.\" },\n \"price\": { \"type\": \"string\", \"description\": \"Numeric price only, e.g. 12.29\" },\n \"currency\": { \"type\": \"string\", \"description\": \"Price currency code/symbol if available (e.g. USD, B/., $).\" },\n \"category\": { \"type\": \"string\", \"description\": \"Breadcrumb category; prefer the node 'leches' if present, else the most specific category.\" },\n \"description\": { \"type\": \"string\", \"description\": \"Long textual description.\" },\n \"image\": { \"type\": \"string\", \"description\": \"Main image URL.\" },\n \"url\": { \"type\": \"string\", \"description\": \"Canonical product URL.\" }\n },\n \"required\": [\"title\", \"price\", \"url\"]\n },\n \"extraction_type\": \"schema\",\n \"instruction\": \"Extract data primarily from <script type='application/ld+json'> with @type='Product' and from BreadcrumbList. Map fields as follows: title=Product.name; sku=Product.sku or Product.mpn; price=Product.offers.price (return only the number, no symbols); currency=Product.offers.priceCurrency if present; description=Product.description; image=first of Product.image; url=Product.url or the page URL. For category, read BreadcrumbList item names and return 'leches' if present, otherwise the most specific (last) breadcrumb. If any field is missing in JSON-LD, fallback to DOM: title from H1; sku from the text after 'Referencia:'; price from visible price near the buy button; description from the 'Descripción' section; image from the main gallery image. Normalize whitespace. Do not invent values.\"\n }\n },\n \"cache_mode\": \"bypass\"\n}\n",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
672,
0
],
"id": "dd70ec7c-340d-419b-a1b1-b5b6957d7319",
"name": "Markdown Crawl Request",
"credentials": {
"httpBasicAuth": {
"id": "kSyyvvNaOBuA00C4",
"name": "crawl4aiserver"
},
"httpHeaderAuth": {
"id": "VLM9roYC9zcTGJsa",
"name": "panel"
}
}
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1LatvxzjsFgWUcDgqIFubGbsy6yNeeSwZ7w9yg_tb8xY",
"mode": "list",
"cachedResultName": "UrlsTest",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LatvxzjsFgWUcDgqIFubGbsy6yNeeSwZ7w9yg_tb8xY/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Hoja 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LatvxzjsFgWUcDgqIFubGbsy6yNeeSwZ7w9yg_tb8xY/edit#gid=0"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [
192,
0
],
"id": "154ea175-3008-4066-9980-db7014b35c5b",
"name": "Get row(s) in sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "SE121yXzuB6zr94l",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
400,
0
],
"id": "b3d6614a-8b26-4a86-b147-b60856976883",
"name": "Loop Over Items"
}
],
"pinData": {},
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "Get row(s) in sheet",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Get LLM Crawl",
"type": "main",
"index": 0
}
]
]
},
"Get LLM Crawl": {
"main": [
[
{
"node": "LLM TID Field",
"type": "main",
"index": 0
}
]
]
},
"LLM TID Field": {
"main": [
[
{
"node": "LLM if In Process",
"type": "main",
"index": 0
}
]
]
},
"LLM if In Process": {
"main": [
[
{
"node": "LLM Result",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Markdown Crawl Request": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Get row(s) in sheet": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Markdown Crawl Request",
"type": "main",
"index": 0
}
]
]
},
"LLM Result": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "89103fc7-3505-45a9-98b3-c82b01d10eb3",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "57b253ac4a90f3c1149cb4540b0ccf8677c4c106dc133e4a240f1f14ec79a39c"
},
"id": "r3mvCmZFRPHrWOGS",
"tags": []
}