Monitoreo de precios competitivos (rastreador web, Google Sheets y alertas de Discord)
Este es unMarket Researchflujo de automatización del dominio deautomatización que contiene 21 nodos.Utiliza principalmente nodos como If, Code, Html, Discord, HttpRequest. uso网络爬虫、Google Sheets y Discord 警报进行竞争价格monitoreo
- •Bot Token de Discord o Webhook
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Credenciales de API de Google Sheets
Nodos utilizados (21)
Categoría
{
"meta": {
"instanceId": "bfc245d93526dceb7636f8b1e64128b218e1b1dd93d65d163c189ecbc1cc0b90",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "646a8d10-7ded-4f80-aa17-86c53bddbc43",
"name": "Disparador Programado",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-680,
140
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "c5199922-2c7e-4752-b016-b9c7715f6ed1",
"name": "Discord1",
"type": "n8n-nodes-base.discord",
"position": [
560,
180
],
"webhookId": "1afc816c-6d68-499b-936a-f76b220dd651",
"parameters": {
"content": "Price checks complete.",
"options": {},
"authentication": "webhook"
},
"credentials": {
"discordWebhookApi": {
"id": "R7mNwWe0jAFbTAB9",
"name": "Discord Webhook account"
}
},
"typeVersion": 2
},
{
"id": "e21bf2ed-e964-479e-9097-3b35d834d9ee",
"name": "Nota Adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
780,
380
],
"parameters": {
"width": 660,
"height": 380,
"content": "## setting checked column to \"0\" for next day checks"
},
"typeVersion": 1
},
{
"id": "f5dbaff2-5cdc-474c-8f6e-0ec299730a0f",
"name": "Nota Adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
500,
120
],
"parameters": {
"color": 4,
"width": 200,
"height": 200,
"content": "price checks completed message to discord"
},
"typeVersion": 1
},
{
"id": "b5d5c422-af74-408a-b060-3e5bf8c6578d",
"name": "obtener fila no marcada",
"type": "n8n-nodes-base.googleSheets",
"position": [
-300,
140
],
"parameters": {
"options": {
"returnFirstMatch": true
},
"filtersUI": {
"values": [
{
"lookupValue": "0",
"lookupColumn": "checked"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit?usp=drivesdk",
"cachedResultName": "price-check-sheet"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "b57GlApcZwTGd5nZ",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6,
"alwaysOutputData": true
},
{
"id": "cee99b2f-6d63-40dc-bbfc-d98dc6bd3449",
"name": "HTTP Solicitud a página de producto",
"type": "n8n-nodes-base.httpRequest",
"position": [
420,
-105
],
"parameters": {
"url": "={{ $json['Competitor URL'] }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "0b842eec-6f2d-4c62-ab00-403164951e64",
"name": "extraer precio de la página",
"type": "n8n-nodes-base.html",
"position": [
640,
-105
],
"parameters": {
"options": {},
"operation": "extractHtmlContent",
"extractionValues": {
"values": [
{
"key": "price",
"cssSelector": ".price_color"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "cce7d4e7-98a5-4c70-b90f-007ee6402e94",
"name": "Código para convertir precio a número",
"type": "n8n-nodes-base.code",
"position": [
860,
-105
],
"parameters": {
"jsCode": "const priceStr = $input.first().json.price\nconst priceNumber = parseFloat(priceStr.replace(\"£\", \"\").trim());\n\nreturn [{ json: { price: priceNumber } }];\n"
},
"typeVersion": 2
},
{
"id": "f74511f8-a89b-44ab-be06-74bc6522cec5",
"name": "¿precio mayor que el nuestro?",
"type": "n8n-nodes-base.if",
"position": [
1080,
-105
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "37f18553-eb25-4f11-9803-73db6f67091c",
"operator": {
"type": "number",
"operation": "lt"
},
"leftValue": "={{ $json.price }}",
"rightValue": "={{ $('get unchecked row').item.json['my Price'] }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d597ca2e-2e41-45c0-a8da-b1285bde2cd6",
"name": "alerta de precio Discord",
"type": "n8n-nodes-base.discord",
"position": [
1300,
-180
],
"webhookId": "56fe5f69-c879-4d1d-b436-588bf79e3d43",
"parameters": {
"content": "=competitor has decreased price on product: {{ $('get unchecked row').item.json['Product Name'] }}\n\nour price: {{ $('get unchecked row').item.json['my Price'] }}\ncompetitor's price:{{ $('Code to convert price into number').item.json.price }}",
"options": {},
"authentication": "webhook"
},
"credentials": {
"discordWebhookApi": {
"id": "R7mNwWe0jAFbTAB9",
"name": "Discord Webhook account"
}
},
"typeVersion": 2
},
{
"id": "ded0c28b-e4d1-494a-bd6f-e2b88bb12c61",
"name": "Actualizar estado a 1",
"type": "n8n-nodes-base.googleSheets",
"position": [
1520,
95
],
"parameters": {
"columns": {
"value": {
"checked": "1",
"Product Name": "={{ $('get unchecked row').item.json['Product Name'] }}",
"competitor price": "={{ $('Code to convert price into number').item.json.price }}"
},
"schema": [
{
"id": "Product Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Product Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "my Price",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "my Price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Competitor URL",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Competitor URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "competitor price",
"type": "string",
"display": true,
"required": false,
"displayName": "competitor price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "checked",
"type": "string",
"display": true,
"required": false,
"displayName": "checked",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Product Name"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit?usp=drivesdk",
"cachedResultName": "price-check-sheet"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "b57GlApcZwTGd5nZ",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "6b784dd4-681b-4e80-83ca-80dbe0e1e519",
"name": "Obtener fila de estado",
"type": "n8n-nodes-base.googleSheets",
"position": [
840,
520
],
"parameters": {
"options": {
"returnFirstMatch": true
},
"filtersUI": {
"values": [
{
"lookupValue": "1",
"lookupColumn": "checked"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit?usp=drivesdk",
"cachedResultName": "price-check-sheet"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "b57GlApcZwTGd5nZ",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6,
"alwaysOutputData": true
},
{
"id": "af9aea9b-5370-439f-8bf7-84159b3bb1cf",
"name": "¿se devolvió fila?",
"type": "n8n-nodes-base.if",
"position": [
1060,
440
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "998fc0d0-8d33-43cb-b6e8-f9516c28b55f",
"operator": {
"type": "object",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "af494912-3a5a-4b78-a0c4-57a3f1be5af6",
"name": "Actualizar estado de vuelta a 0",
"type": "n8n-nodes-base.googleSheets",
"position": [
1280,
520
],
"parameters": {
"columns": {
"value": {
"checked": "0",
"Product Name": "={{ $json[\"Product Name\"] }}"
},
"schema": [
{
"id": "Product Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Product Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "my Price",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "my Price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Competitor URL",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Competitor URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "competitor price",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "competitor price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "checked",
"type": "string",
"display": true,
"required": false,
"displayName": "checked",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Product Name"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16-hEaIl8Tng5SB5jbpu26kT7G-g1cFM5_w2AILwT3Pc/edit?usp=drivesdk",
"cachedResultName": "price-check-sheet"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "b57GlApcZwTGd5nZ",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "6c1fe1cd-56af-4c51-91b3-d5eaa9ce2948",
"name": "Nota Adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-820,
40
],
"parameters": {
"width": 300,
"height": 280,
"content": "## start at desired schedule\n### daily in this example"
},
"typeVersion": 1
},
{
"id": "2a156baa-d3fc-4d73-8241-d6021ddf1514",
"name": "Nota Adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
360,
-220
],
"parameters": {
"width": 860,
"height": 300,
"content": "## get price from competitor's product page and convert into number\n"
},
"typeVersion": 1
},
{
"id": "5e3db4b8-4bb7-477e-873c-ac77a5536ce1",
"name": "Nota Adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-340,
-20
],
"parameters": {
"width": 180,
"height": 340,
"content": "## get un checked roe\n- ### extract name, page-url, our price"
},
"typeVersion": 1
},
{
"id": "644a8dbc-6f7b-49cb-bc7b-96157db7a4ea",
"name": "¿existe fila?",
"type": "n8n-nodes-base.if",
"position": [
100,
140
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8dd1be30-0d27-4c75-9d0b-c0db05a0fb4f",
"operator": {
"type": "object",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json}}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "2bae4c20-dabc-4833-9524-46308c3017b3",
"name": "Nota Adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1260,
-380
],
"parameters": {
"color": 3,
"width": 180,
"height": 380,
"content": "## discord alert \n- ### our price is greater than competition"
},
"typeVersion": 1
},
{
"id": "5e289971-7536-4c4f-a508-eb8af7e63fb9",
"name": "Nota Adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1480,
-20
],
"parameters": {
"width": 260,
"height": 260,
"content": "## set checked to 1"
},
"typeVersion": 1
},
{
"id": "107fdca7-f641-4237-851a-776b63f5949c",
"name": "Nota Adhesiva7",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
-100
],
"parameters": {
"width": 260,
"height": 360,
"content": "## if unchecked row exist?\n- ### yes? (then extracts data)\n- ### else sends message checks are done and set checks to 0 for next day checks "
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"c5199922-2c7e-4752-b016-b9c7715f6ed1": {
"main": [
[
{
"node": "6b784dd4-681b-4e80-83ca-80dbe0e1e519",
"type": "main",
"index": 0
}
]
]
},
"644a8dbc-6f7b-49cb-bc7b-96157db7a4ea": {
"main": [
[
{
"node": "cee99b2f-6d63-40dc-bbfc-d98dc6bd3449",
"type": "main",
"index": 0
}
],
[
{
"node": "c5199922-2c7e-4752-b016-b9c7715f6ed1",
"type": "main",
"index": 0
}
]
]
},
"af9aea9b-5370-439f-8bf7-84159b3bb1cf": {
"main": [
[
{
"node": "af494912-3a5a-4b78-a0c4-57a3f1be5af6",
"type": "main",
"index": 0
}
]
]
},
"6b784dd4-681b-4e80-83ca-80dbe0e1e519": {
"main": [
[
{
"node": "af9aea9b-5370-439f-8bf7-84159b3bb1cf",
"type": "main",
"index": 0
}
]
]
},
"646a8d10-7ded-4f80-aa17-86c53bddbc43": {
"main": [
[
{
"node": "b5d5c422-af74-408a-b060-3e5bf8c6578d",
"type": "main",
"index": 0
}
]
]
},
"b5d5c422-af74-408a-b060-3e5bf8c6578d": {
"main": [
[
{
"node": "644a8dbc-6f7b-49cb-bc7b-96157db7a4ea",
"type": "main",
"index": 0
}
]
]
},
"ded0c28b-e4d1-494a-bd6f-e2b88bb12c61": {
"main": [
[
{
"node": "b5d5c422-af74-408a-b060-3e5bf8c6578d",
"type": "main",
"index": 0
}
]
]
},
"d597ca2e-2e41-45c0-a8da-b1285bde2cd6": {
"main": [
[
{
"node": "ded0c28b-e4d1-494a-bd6f-e2b88bb12c61",
"type": "main",
"index": 0
}
]
]
},
"af494912-3a5a-4b78-a0c4-57a3f1be5af6": {
"main": [
[
{
"node": "6b784dd4-681b-4e80-83ca-80dbe0e1e519",
"type": "main",
"index": 0
}
]
]
},
"0b842eec-6f2d-4c62-ab00-403164951e64": {
"main": [
[
{
"node": "cce7d4e7-98a5-4c70-b90f-007ee6402e94",
"type": "main",
"index": 0
}
]
]
},
"f74511f8-a89b-44ab-be06-74bc6522cec5": {
"main": [
[
{
"node": "d597ca2e-2e41-45c0-a8da-b1285bde2cd6",
"type": "main",
"index": 0
}
],
[
{
"node": "ded0c28b-e4d1-494a-bd6f-e2b88bb12c61",
"type": "main",
"index": 0
}
]
]
},
"cee99b2f-6d63-40dc-bbfc-d98dc6bd3449": {
"main": [
[
{
"node": "0b842eec-6f2d-4c62-ab00-403164951e64",
"type": "main",
"index": 0
}
]
]
},
"cce7d4e7-98a5-4c70-b90f-007ee6402e94": {
"main": [
[
{
"node": "f74511f8-a89b-44ab-be06-74bc6522cec5",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Investigación de mercado
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
moosa
@moosaCompartir este flujo de trabajo