使用 ScrapeGraphAI 跟踪亚马逊产品价格

中级

这是一个Market Research、AI Summarization领域的自动化工作流,包含 13 个节点。主要使用 If、Merge、Telegram、GoogleSheets、ManualTrigger 等节点。 使用 ScrapeGraphAI、Google Sheets 和 Telegram 警报跟踪亚马逊产品价格

前置要求
  • Telegram Bot Token
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "GP6WsXTLgM9LhI8E",
  "meta": {
    "instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
    "templateCredsSetupCompleted": true
  },
  "name": "使用 ScrapeGraphAI 跟踪亚马逊产品价格",
  "tags": [],
  "nodes": [
    {
      "id": "c934786f-96c6-4d3e-8e08-6eb7cf522116",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -240,
        -160
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtMinute": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3f91dab9-db6e-4a8e-8f5f-4acf2f53f706",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -240,
        -16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f928ffea-524e-4f9f-9f4c-c994d0991edd",
      "name": "抓取亚马逊产品价格",
      "type": "n8n-nodes-scrapegraphai.scrapegraphAi",
      "position": [
        576,
        0
      ],
      "parameters": {
        "userPrompt": "You are an expert extraction algorithm. Extract the price of the Amazon product",
        "websiteUrl": "={{ $json.URL }}",
        "renderHeavyJs": true,
        "useOutputSchema": true
      },
      "credentials": {
        "scrapegraphAIApi": {
          "id": "EOxCPnl9IynxgpyB",
          "name": "ScrapegraphAI account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "32e9c8fb-a015-40f0-b2be-c65a689bc335",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        864,
        272
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "d83e6ad5-621c-4ca4-9177-194d673f626d",
      "name": "最低价格?",
      "type": "n8n-nodes-base.if",
      "position": [
        864,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "79dfbedd-c17c-4913-b739-3f6395cea670",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $json.result.price }}",
              "rightValue": "={{ $('Loop').item.json['MIN PRICE'] }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ddc8c4de-cc4e-4286-a21e-0160a692d897",
      "name": "更新价格",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        256,
        256
      ],
      "parameters": {
        "columns": {
          "value": {
            "DATE": "={{$now.format('dd/LL/yyyy')}}",
            "MIN PRICE": "={{ $('Scrape Amazon Product Price').item.json.result.price }}",
            "row_number": "={{ $('Loop').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "PRODUCT ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "PRODUCT ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "DATE",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "DATE",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "MIN PRICE",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "MIN PRICE",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_FBegOUXt3657og_ScfuiLCERWHtxDWn14799HkVrUo/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1_FBegOUXt3657og_ScfuiLCERWHtxDWn14799HkVrUo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_FBegOUXt3657og_ScfuiLCERWHtxDWn14799HkVrUo/edit?usp=drivesdk",
          "cachedResultName": "Amazon Price Alert"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "5e331171-bc70-44b6-92fe-04e8bc9f83f1",
      "name": "发送提醒",
      "type": "n8n-nodes-base.telegram",
      "position": [
        576,
        256
      ],
      "webhookId": "0ed28553-2c4f-48cc-aed7-9cdb7dff7ff2",
      "parameters": {
        "text": "=The product {{ $('Loop').item.json['PRODUCT '] }} (sold by {{ $json['MIN PRICE'] }}) has just hit its lowest price yet on Amazon! 🎉 Check it out: {{ $('Min price?').item.json.website_url }}",
        "chatId": "XXX",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "0hSq9VwaiJifiscT",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "adefe5e4-1533-4dcc-8933-21de86f3fca6",
      "name": "获取产品",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -16,
        -16
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_FBegOUXt3657og_ScfuiLCERWHtxDWn14799HkVrUo/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1_FBegOUXt3657og_ScfuiLCERWHtxDWn14799HkVrUo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_FBegOUXt3657og_ScfuiLCERWHtxDWn14799HkVrUo/edit?usp=drivesdk",
          "cachedResultName": "Amazon Price Alert"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "58665e12-61a2-4fca-ba9c-8632a693f9ef",
      "name": "循环",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        256,
        -16
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "43d41bfa-6dcf-417c-b645-2cc49220be28",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -608
      ],
      "parameters": {
        "color": 3,
        "width": 640,
        "height": 384,
        "content": "## 使用 ScrapeGraphAI 跟踪亚马逊产品价格"
      },
      "typeVersion": 1
    },
    {
      "id": "e0675997-61a9-4ab1-84fa-5fdf11e7861f",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -608
      ],
      "parameters": {
        "width": 544,
        "height": 112,
        "content": "## 步骤 1"
      },
      "typeVersion": 1
    },
    {
      "id": "b9a09f0f-f3c5-43a4-b806-c9675530a2be",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -464
      ],
      "parameters": {
        "width": 544,
        "height": 128,
        "content": "## 步骤 2"
      },
      "typeVersion": 1
    },
    {
      "id": "c0ad8f90-1a21-4f35-aff4-1e098300d082",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -304
      ],
      "parameters": {
        "width": 544,
        "height": 80,
        "content": "## 步骤 3"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "97fb6e87-7f47-4690-baac-da63a67313f3",
  "connections": {
    "Loop": {
      "main": [
        [],
        [
          {
            "node": "Scrape Amazon Product Price",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Min price?": {
      "main": [
        [
          {
            "node": "Update price",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Send alert": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get products": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update price": {
      "main": [
        [
          {
            "node": "Send alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Amazon Product Price": {
      "main": [
        [
          {
            "node": "Min price?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

这是一个中级难度的工作流,适用于Market Research、AI Summarization等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量13
分类2
节点类型9
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at info@n3w.it or add me on Linkedin.com/in/davideboizza

外部链接
在 n8n.io 上查看 →

分享此工作流