8
n8n 中文网amn8n.com

Play商店应用排名跟踪器

高级

这是一个Market Research, Multimodal AI领域的自动化工作流,包含 18 个节点。主要使用 Set, Code, Merge, Slack, Baserow 等节点。 使用SerpApi、Baserow和Slack提醒跟踪Play商店应用排名

前置要求
  • Slack Bot Token 或 Webhook URL
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "j4Cj4lJiSvXIpi0a",
  "meta": {
    "instanceId": "52e884ae001cccb7f48e66f574b6c443cc8d2e65165bafca1e102e0d325fcec1",
    "templateCredsSetupCompleted": true
  },
  "name": "Play Store 应用排名跟踪器",
  "tags": [
    {
      "id": "h1n9pM94D2GUxQBw",
      "name": "ASO",
      "createdAt": "2025-06-11T00:48:24.857Z",
      "updatedAt": "2025-06-11T00:48:24.857Z"
    }
  ],
  "nodes": [
    {
      "id": "00b0346e-297b-43fe-9188-bef36a79a78e",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        -20
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fd981cd3-2cf8-4cb0-8dc8-21cd4bfd02a9",
      "name": "保持上下文",
      "type": "n8n-nodes-base.set",
      "position": [
        820,
        -20
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "6b225b26-5317-4e55-bd41-12d904ad0136",
              "name": "id",
              "type": "number",
              "value": "={{ $json.id }}"
            },
            {
              "id": "4c31a5bf-38e2-4ca2-a0ef-268198d34532",
              "name": "Keywords",
              "type": "string",
              "value": "={{ $json.Keywords }}"
            },
            {
              "id": "81a8b6cc-dae3-4c45-b07d-cb4a36719798",
              "name": "currentRank",
              "type": "string",
              "value": "={{ $json.currentRank }}"
            },
            {
              "id": "16205c3d-7996-4bc3-a4c7-ba92ea7dbedd",
              "name": "Previous Rank",
              "type": "string",
              "value": "={{ $json[\"Previous Rank\"] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "8e1be6a7-9d76-4f43-bda6-574b122636cb",
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1020,
        260
      ],
      "webhookId": "2d5a133e-6630-4687-b7bf-b4d54adea304",
      "parameters": {
        "text": "🚀 RPSC App Rankings Just Updated!\nSee how we're performing 👉 https://baserow.io/public/grid/mjkYq2wWb6vIE3MsB1RannZgclvdHKacNE3zEVrC5Bo",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "url",
          "value": "https://app.slack.com/client/T053HKKDY12/C08AGRQ9GBF"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "8ZuS3gFS2ElwETYS",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "814a072d-c55a-4a6b-829e-89c097e64544",
      "name": "便签33",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -120
      ],
      "parameters": {
        "color": 3,
        "width": 260,
        "height": 260,
        "content": "## 检查排名更新"
      },
      "typeVersion": 1
    },
    {
      "id": "b701b1c1-924d-4431-9973-acb8f4a0c67c",
      "name": "便签16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        -120
      ],
      "parameters": {
        "width": 260,
        "height": 260,
        "content": "## 从 Baserow 获取关键词"
      },
      "typeVersion": 1
    },
    {
      "id": "95b54bce-e074-4047-ab26-ddd237de4072",
      "name": "便签17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -120
      ],
      "parameters": {
        "color": 4,
        "width": 260,
        "height": 260,
        "content": "## 准备搜索查询"
      },
      "typeVersion": 1
    },
    {
      "id": "e4255c27-4548-4563-96a6-b7d97183c106",
      "name": "便签18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        -120
      ],
      "parameters": {
        "color": 5,
        "height": 260,
        "content": "## 存储行上下文"
      },
      "typeVersion": 1
    },
    {
      "id": "baccdae4-f782-40b1-998c-52bf4c2397ad",
      "name": "便签19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        -120
      ],
      "parameters": {
        "color": 6,
        "width": 260,
        "height": 260,
        "content": "## 通过 SerpApi 搜索 Play Store"
      },
      "typeVersion": 1
    },
    {
      "id": "e98fb372-7174-4d9a-a98e-4ae3995ad4d9",
      "name": "便签34",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        160
      ],
      "parameters": {
        "color": 5,
        "width": 260,
        "height": 260,
        "content": "## 合并结果 + 上下文"
      },
      "typeVersion": 1
    },
    {
      "id": "954bf90b-e556-4915-9249-621ab3b41215",
      "name": "便签35",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        160
      ],
      "parameters": {
        "color": 6,
        "width": 260,
        "height": 260,
        "content": "## 提取应用排名"
      },
      "typeVersion": 1
    },
    {
      "id": "ec466f86-8b3c-43b9-91f2-20a1776551f2",
      "name": "便签36",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        160
      ],
      "parameters": {
        "color": 3,
        "width": 340,
        "height": 260,
        "content": "## 在 Baserow 中更新排名"
      },
      "typeVersion": 1
    },
    {
      "id": "bf1b3de5-22f8-4d45-bc2f-b887b6314466",
      "name": "便签37",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        160
      ],
      "parameters": {
        "color": 2,
        "width": 440,
        "height": 260,
        "content": "## 发送 Slack 提醒"
      },
      "typeVersion": 1
    },
    {
      "id": "e091fa90-ce43-4200-80ff-6118c3c9bcfc",
      "name": "在 Baserow 中更新排名",
      "type": "n8n-nodes-base.baserow",
      "position": [
        600,
        260
      ],
      "parameters": {
        "rowId": "={{ $json.id }}",
        "tableId": 568021,
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": 4563204,
              "fieldValue": "={{ $json.currentRank }}"
            },
            {
              "fieldId": 4563209,
              "fieldValue": "={{ $json.previousRank }}"
            }
          ]
        },
        "operation": "update",
        "databaseId": 239215
      },
      "credentials": {
        "baserowApi": {
          "id": "XsR4iTiq5oC1XK3J",
          "name": "Arunava"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3be3cc0b-46ac-4a7a-83b6-01eea70d34c3",
      "name": "从 Baserow 获取关键词",
      "type": "n8n-nodes-base.baserow",
      "position": [
        260,
        -20
      ],
      "parameters": {
        "tableId": 568021,
        "returnAll": true,
        "databaseId": 239215,
        "additionalOptions": {}
      },
      "credentials": {
        "baserowApi": {
          "id": "XsR4iTiq5oC1XK3J",
          "name": "Arunava"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e8bf6a9e-8f3b-42be-95b4-a991cf41ec9d",
      "name": "准备搜索查询",
      "type": "n8n-nodes-base.code",
      "position": [
        560,
        -20
      ],
      "parameters": {
        "jsCode": "const apiKey = \"{api_key}\";\nconst packageId = \"practice.test.daily.testline\";\n\nreturn items.map(item => {\n  const keyword = item.json[\"Keywords\"];\n  const id = item.json.id;\n  const currentRank = item.json[\"Current Rank\"];\n\n  const serpapiUrl = `https://serpapi.com/search.json?engine=google_play&q=${encodeURIComponent(keyword)}&gl=in&hl=en&store=apps&api_key=${apiKey}`;\n\n  return {\n    json: {\n      ...item.json,          // important: keep all Baserow fields\n      id,                   // row ID for update\n      currentRank,          // existing rank for history\n      packageId,            // fixed app package\n      serpapi_url: serpapiUrl\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "812076cb-d038-46f5-ad3b-fa73a7c2ba7f",
      "name": "通过 SerpAPI 搜索 PlayStore",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        -20
      ],
      "parameters": {
        "url": "https://serpapi.com/search.json",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "engine",
              "value": "google_play"
            },
            {
              "name": "q",
              "value": "={{ $json.Keywords }}"
            },
            {
              "name": "api_key"
            },
            {
              "name": "gl",
              "value": "in"
            },
            {
              "name": "hl",
              "value": "en"
            },
            {
              "name": "store",
              "value": "apps"
            }
          ]
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "cc33dcd6-2898-488e-86e5-9ca627171e2a",
      "name": "合并数据",
      "type": "n8n-nodes-base.merge",
      "position": [
        0,
        260
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "d8bb2f41-a9f6-4199-8132-9ea779f80fa5",
      "name": "获取应用排名",
      "type": "n8n-nodes-base.code",
      "position": [
        280,
        260
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const appId = \"{app_package_name}\";\nconst results = $json[\"organic_results\"] || [];\n\nlet rank = null;\nlet position = 1;\n\nfor (const block of results) {\n  if (!block.items) continue;\n\n  for (const app of block.items) {\n    if (app.product_id === appId) {\n      rank = position;\n      break;\n    }\n    position++;\n  }\n\n  if (rank !== null) break;\n}\n\nif (rank === null) rank = 0;\n\nreturn {\n  json: {\n    id: $json.id,  // will now work ✅\n    keyword: $json.Keywords,\n    currentRank: rank,\n    previousRank: $json.currentRank || null\n  }\n};\n"
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "015ae8b9-6800-4506-8864-f269a64bf319",
  "connections": {
    "Merge Data": {
      "main": [
        [
          {
            "node": "Get App Rank",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get App Rank": {
      "main": [
        [
          {
            "node": "Update Rank in Baserow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep Context": {
      "main": [
        [
          {
            "node": "Search PlayStore via SerpAPI",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Fetch Keywords from Baserow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Search Queries": {
      "main": [
        [
          {
            "node": "Keep Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Rank in Baserow": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Keywords from Baserow": {
      "main": [
        [
          {
            "node": "Prepare Search Queries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search PlayStore via SerpAPI": {
      "main": [
        [
          {
            "node": "Merge Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 市场调研, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
高级
节点数量18
分类2
节点类型8
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Arunava

Arunava

@arunava

Product & Growth at Testline AI | Automating the Boring Stuff with AI Agents | Ex-RecordBook (YC W22)

外部链接
在 n8n.io 查看

分享此工作流