8
n8n 中文网amn8n.com

按国家和语言追踪 YouTube 趋势

中级

这是一个Market Research, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Code, FormTrigger, HttpRequest, GoogleSheets 等节点。 使用 RapidAPI 和 Google Sheets 按国家和语言追踪 YouTube 趋势

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "33a8f510-6783-405c-ba7d-7e47f0a2f60a",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ],
      "webhookId": "1e7c6523-c596-4fff-b8aa-d449dc4ef1f8",
      "parameters": {
        "options": {},
        "formTitle": "YouTube Trend Finder",
        "formFields": {
          "values": [
            {
              "fieldLabel": "country",
              "requiredField": true
            },
            {
              "fieldLabel": "language",
              "requiredField": true
            }
          ]
        },
        "formDescription": "YouTube Trend Finder"
      },
      "typeVersion": 2.2
    },
    {
      "id": "b4b4f333-e1e0-4975-ae38-dbe97ec64d58",
      "name": "重新格式化输出",
      "type": "n8n-nodes-base.code",
      "position": [
        600,
        0
      ],
      "parameters": {
        "jsCode": "return $input.first().json.data"
      },
      "typeVersion": 2
    },
    {
      "id": "2dd88e60-e845-4f27-8eed-eb8a9e6f9b33",
      "name": "趋势查找器 API 请求",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        300,
        0
      ],
      "parameters": {
        "url": "https://youtube-trend-finder.p.rapidapi.com/trend.php",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "country",
              "value": "={{ $json.country }}"
            },
            {
              "name": "language",
              "value": "={{ $json.language }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-rapidapi-host",
              "value": "youtube-trend-finder.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "your key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "93499909-4c8e-4e78-be48-3ce16b918f39",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        840,
        0
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "thumbnail",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "thumbnail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "link",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tags",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "tags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1GtSSz6EiZBDdRUfjlkN3VOsbHGsjDz2jRqiZKSBwRyc",
          "cachedResultUrl": "",
          "cachedResultName": "Yt Trend"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "Rt0RWApx8PL9t0RF",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "1ed9b35d-ca25-427e-bded-46365399e48b",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -780,
        -260
      ],
      "parameters": {
        "width": 600,
        "height": 620,
        "content": "# 🧠 YouTube 趋势查找器 – 工作流摘要"
      },
      "typeVersion": 1
    },
    {
      "id": "f123eef9-866b-4bdb-9203-00f951d9bed2",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -240
      ],
      "parameters": {
        "height": 420,
        "content": "## 1. **表单提交时** (`表单触发器`)"
      },
      "typeVersion": 1
    },
    {
      "id": "cfa17b85-3697-427d-af93-ca84c869e22c",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -240
      ],
      "parameters": {
        "height": 420,
        "content": "## 2. **趋势查找器 API 请求** (`HTTP 请求`)"
      },
      "typeVersion": 1
    },
    {
      "id": "bf77fd01-9d9e-4f23-a911-a3dd4c85d165",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        -240
      ],
      "parameters": {
        "height": 420,
        "content": "## 3. **重新格式化输出** (`代码`)"
      },
      "typeVersion": 1
    },
    {
      "id": "61c88d9f-3a1f-49f3-8281-e4ce014b5a11",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        780,
        -240
      ],
      "parameters": {
        "height": 420,
        "content": "## 4. **Google 表格** (`追加到表格`)"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Re format output": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Trend Finder Api Request ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trend Finder Api Request ": {
      "main": [
        [
          {
            "node": "Re format output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流