Subir archivos a "/"

This commit is contained in:
2026-05-09 17:46:38 +00:00
commit e6d9b29457
2 changed files with 683 additions and 0 deletions
+360
View File
@@ -0,0 +1,360 @@
{
"name": "Website Craw CSS",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
496,
0
],
"id": "276425c9-312d-41db-8abe-0d126c5e63bc",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"amount": 15
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
880,
0
],
"id": "201b3b1b-cebe-4c9e-abc6-ddf6bf289704",
"name": "Wait",
"webhookId": "bd46a11c-b55b-4967-878b-9e77cf7ae8ac"
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={\n\"products\": {{\n$('Get LLM Crawl').last().json.results.flatMap(item => {\nconst parsed = JSON.parse(item.extracted_content);\nreturn parsed.map(({ rating, ...rest }) => ({\n...rest,\nstar_count: Array.isArray(rating) ? rating.length : 0\n}));\n})\n}}\n}\n\n",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1632,
-16
],
"id": "0c9c0b61-4f26-498a-af48-39d311009a36",
"name": "LLM Result"
},
{
"parameters": {
"url": "=https://pruebadetemplate-crwal4ai.k11ytw.easypanel.host/task/{{ $json.task_id }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1056,
0
],
"id": "a78332b7-7b8c-4d88-ab86-c20a07557e43",
"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": "0e2549d5-b06c-4bd8-93ca-6f7e81f81d53",
"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": "e83c31da-0d64-4fb0-b9ab-8b7ebd941ce5",
"name": "LLM if In Process"
},
{
"parameters": {
"method": "POST",
"url": "https://pruebadetemplate-crwal4ai.k11ytw.easypanel.host/crawl",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"urls\": {{ JSON.stringify(Array.from({ length: 2 }, (_, i) =>\n'https://sandbox.oxylabs.io/products?page=${i + 1}')) }},\n \"crawler_params\": {\n \"headless\": true\n },\n \"extraction_config\": {\n \"type\": \"json_css\",\n \"params\": {\n \"schema\": {\n \"name\": \"Oxylabs Products\",\n \"baseSelector\": \"div.product-card\",\n \"fields\": [\n {\n \"name\": \"product_link\",\n \"selector\": \".card-header\",\n \"type\": \"attribute\",\n \"attribute\": \"href\"\n },\n {\n \"name\": \"title\",\n \"selector\": \".title\",\n \"type\": \"text\"\n },\n {\n \"name\": \"rating\",\n \"type\": \"list\",\n \"selector\": \".rating svg\",\n \"fields\": [\n {\n \"name\": \"star_svg\",\n \"type\": \"html\"\n }\n ]\n },\n {\n \"name\": \"description\",\n \"selector\": \".description\",\n \"type\": \"text\"\n },\n {\n \"name\": \"price\",\n \"selector\": \".price-wrapper\",\n \"type\": \"text\"\n },\n {\n \"name\": \"stock_status\",\n \"selector\": \".in-stock\",\n \"type\": \"text\"\n }\n ]\n }\n }\n },\n \"verbose\": true,\n \"cache_mode\": \"bypass\",\n \"semaphore_count\": 2\n}\n",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
672,
0
],
"id": "05fbc6b5-989e-4cfa-bc6b-f12d1c43255e",
"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": [
1072,
272
],
"id": "74ee3af8-6237-43c7-909c-1c72f52a5a0c",
"name": "Get row(s) in sheet",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "SE121yXzuB6zr94l",
"name": "Google Sheets account"
}
},
"disabled": true
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
1280,
272
],
"id": "e5199e00-0338-4f3d-88c6-8ec96835975f",
"name": "Loop Over Items",
"disabled": true
},
{
"parameters": {
"fieldToSplitOut": "products",
"options": {}
},
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
1808,
-16
],
"id": "748d3237-e40b-4f4c-800a-625c24ab6cd2",
"name": "Split Out"
},
{
"parameters": {
"binaryPropertyName": "products",
"options": {}
},
"type": "n8n-nodes-base.convertToFile",
"typeVersion": 1.1,
"position": [
1968,
-16
],
"id": "99c19185-50e6-4b49-9f7e-15c434c03f14",
"name": "Convert to File"
}
],
"pinData": {},
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "Markdown Crawl Request",
"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": [
[],
[]
]
},
"LLM Result": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "fcdd8ae2-6c72-4cf6-a3b9-d87b93e0d0d2",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "57b253ac4a90f3c1149cb4540b0ccf8677c4c106dc133e4a240f1f14ec79a39c"
},
"id": "1qFQ6FmyYMqrrV8n",
"tags": []
}
+323
View File
@@ -0,0 +1,323 @@
{
"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": []
}