8
n8n 中文网amn8n.com

使用AI分析检测病毒式YouTube视频并发送邮件报告

高级

这是一个Miscellaneous, AI Summarization, Multimodal AI领域的自动化工作流,包含 26 个节点。主要使用 Set, Code, Sort, Gmail, Limit 等节点。 使用AI分析检测病毒式YouTube视频并发送邮件报告

前置要求
  • Google 账号和 Gmail API 凭证
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "ce85e8e4-9e2b-46cd-bc0d-1517049e1322",
      "name": "点击“测试工作流”时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -272,
        -448
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "62ca03a8-f032-43e2-95af-48bee0a58b53",
      "name": "计算指标",
      "type": "n8n-nodes-base.code",
      "position": [
        144,
        -144
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "\nconst views = Number($json.ViewCount || 0);\nconst likes = Number($json.likeCount || 0);\nconst comments = Number($json.commentCount || 0);\n\nconst publishedAt = $json.publishedAt || '';\nconst publishTime = new Date (publishedAt).getTime();\nconst now = Date.now();\nconst hoursSincePublish = (now - publishTime) / (1000 * 60 * 60); // Convert millisecond\n\nconst likeRate = views > 0 ? (likes / views) * 100 : 0; // Like percentage \nconst commentRate = views > 0 ? (comments / views) * 100 : 0; // Comment percentage \nconst viewsPerHour = hoursSincePublish > 0 ? views / hoursSincePublish: 0; // Views per\n\nconst title = $json.title || '';\nconst videoID = $json.videoId || '';\nconst youtubeURL = `https://www.youtube.com/watch?v=${videoID}`;\n\nconst channelId = $json.channelID;\nconst channelOpenDate = $json.channelOpenDate;\nconst channelTotalViewCount= $json.channelTotalViewCount;\nconst subscriberCount= $json.subscriberCount ;\nconst categoryID= $json.categoryID;\nconst channelName= $json.channelName;\nconst categoryName= $json.categoryName;\nreturn { \n  title, \n  youtubeURL,  \n  categoryID, \n  categoryName,\n  channelId,\n  channelName,\n  channelOpenDate,\n  channelTotalViewCount,\n  subscriberCount,\n  publishedAt, \n  views,\n  likes, \n  comments, \n  likeRate, \n  commentRate, \n  viewsPerHour\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "584d47e4-3ade-4041-a18d-8f272f12d1fb",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        880,
        -144
      ],
      "parameters": {
        "text": "=json: {{$('Aggregate').item.json.data.toJsonString() }}\n",
        "options": {
          "systemMessage": "=You are an expert YouTube video analyst. Your task is to review a JSON array containing data for {{$('Setup').item.json.maxResult}} YouTube videos, including calculated virality metrics like \"algorithmicLiftScore\", \"viewsPerSubscriber\", and \"relativeEngagementRate\".\n\nYour goal is to provide a concise, insightful summary that highlights the most important findings and patterns.\n\n**Output Requirements:**\n\n1.  **Overall Virality Trend:** Briefly describe the general range of \"algorithmicLiftScore\" and identify if there are any exceptionally viral videos based on this score.\n2.  **Top 3 Most Viral Videos:** List the top 3 videos by \"algorithmicLiftScore\". For each, include:\n    *   Title\n    *   youtubeURL\n    *   Channel Name and Subscriber Count\n    *   views\n    *   viewsPerHour\n    *   Algorithmic Lift Score\n    *   Key reason for high score (e.g., \"extremely high views per subscriber,\" \"exceptional engagement rate for its size,\" \"very rapid view growth\").\n3.  **Key Statistics Averages/Ranges (across all 20 videos):**\n    *   Average `algorithmicLiftScore`\n    *   Average `viewsPerSubscriber`\n    *   Average `relativeEngagementRate`\n    *   Top 3 most common `categoryName` (with count/percentage if possible).\n4.  **Noteworthy Observations/Patterns:**\n    *   Any interesting correlations between `categoryName` and virality.\n    *   Any channels that appear multiple times or show consistent performance.\n    *   Any videos with surprisingly high or low `likeRate` or `commentRate` compared to their `views`.\n    *   General sentiment or common themes in the titles (e.g., \"AI,\" \"shorts,\" \"comedy\").\n5.  **Conciseness:** Keep the summary to a maximum of 300 words. Use bullet points or short paragraphs for readability.\n\n\n**JSON Input example:**\n\"\"\"\n[\n  {\n    \"title\": \"🌟Guess Who #kpop #kpopdemonhunters #sussie #ai\",\n    \"youtubeURL\": \"https://www.youtube.com/watch?v=dfgrtgrrt4t\",\n    \"categoryID\": \"24\",\n    \"categoryName\": \"Entertainment\",\n    \"channelId\": \"UCYCBxphosvertg_ZOmAvdsfvsd\",\n    \"channelName\": \"krytoi oker\",\n    \"channelOpenDate\": \"2025-08-26T12:11:27.987819Z\",\n    \"channelTotalViewCount\": 25715501,\n    \"subscriberCount\": 6650,\n    \"publishedAt\": \"2025-09-06T13:22:10Z\",\n    \"views\": 2646019,\n    \"likes\": 9249,\n    \"comments\": 15,\n    \"likeRate\": 0.0034954397530781145,\n    \"commentRate\": 0.000005668893534022243,\n    \"viewsPerHour\": 65672.62637656713,\n    \"algorithmicLiftScore\": 239.3253287501648,\n    \"relativeEngagementRate\": 0.35011086466121366,\n    \"logViewsPerHour\": 4.817390997890299,\n    \"hoursSincePublished\": 40.29104888888889,\n    \"viewsPerSubscriber\": 397.8975939849624\n  },\n  {\n    \"title\": \"New York help PLEASE! 🙏 #funny #baby #ai #cute #reels #comedy #shorts #trending\",\n    \"youtubeURL\": \"https://www.youtube.com/watch?v=NLKm8HM5453gs\",\n    \"categoryID\": \"24\",\n    \"categoryName\": \"Entertainment\",\n    \"channelId\": \"UCu22ALsY7fvsfvsdrgtsg\",\n    \"channelName\": \"Yazt Creationz\",\n    \"channelOpenDate\": \"2022-11-25T06:58:20.821126Z\",\n    \"channelTotalViewCount\": 21190181,\n    \"subscriberCount\": 30800,\n    \"publishedAt\": \"2025-09-06T12:33:13Z\",\n    \"views\": 937872,\n    \"likes\": 8387,\n    \"comments\": 25,\n    \"likeRate\": 0.008942584915638808,\n    \"commentRate\": 0.000026656089530341027,\n    \"viewsPerHour\": 22815.449610843752,\n    \"algorithmicLiftScore\": 18.975135803015906,\n    \"relativeEngagementRate\": 0.896924100516915,\n    \"logViewsPerHour\": 4.358248066270673,\n    \"hoursSincePublished\": 41.106882222222225,\n    \"viewsPerSubscriber\": 30.45038961038961\n  }\n]"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "2ed02259-c6b8-4568-bf17-306b53685efd",
      "name": "思考",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        1008,
        -272
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "76a2b5f9-fa21-4f20-a7cb-8f643575e9a8",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        864,
        -272
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "lZXeo8SqoOzu2TkW",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "73c079e8-1cef-48f7-9904-c95fa479d0a8",
      "name": "排序",
      "type": "n8n-nodes-base.sort",
      "position": [
        448,
        -144
      ],
      "parameters": {
        "options": {},
        "sortFieldsUi": {
          "sortField": [
            {
              "order": "descending",
              "fieldName": "algorithmicLiftScore"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "141a3525-0575-4ec8-ae72-36e5a8f50cd5",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -272,
        -256
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 13
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b53a3146-f068-4be3-8821-6a54962db65c",
      "name": "获取频道信息",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        -624
      ],
      "parameters": {
        "url": "https://www.googleapis.com/youtube/v3/channels?",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "key",
              "value": "={{ $('Setup').item.json.GoogleAPIkey }}"
            },
            {
              "name": "part",
              "value": "snippet, statistics, topicDetails"
            },
            {
              "name": "id",
              "value": "={{ $json['items.snippet.channelId'] }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d54b9774-3c20-4804-b41b-978b59603bc1",
      "name": "搜索视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        96,
        -448
      ],
      "parameters": {
        "url": "https://www.googleapis.com/youtube/v3/search?",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "key",
              "value": "={{ $('Setup').item.json.GoogleAPIkey }}"
            },
            {
              "name": "part",
              "value": "snippet"
            },
            {
              "name": "order",
              "value": "=viewCount"
            },
            {
              "name": "type",
              "value": "video"
            },
            {
              "name": "publishedAfter",
              "value": "={{ $now.minus({ days: $('Setup').item.json.daysback }).toUTC().toISO() }}"
            },
            {
              "name": "q",
              "value": "={{ $('Setup').item.json.query }}"
            },
            {
              "name": "maxResults",
              "value": "={{ $('Setup').item.json.maxResult }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c6c2bbe2-1a6c-4a46-a859-6c7ccf5dbd25",
      "name": "拆分输出1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        256,
        -448
      ],
      "parameters": {
        "include": "selectedOtherFields",
        "options": {},
        "fieldToSplitOut": "items",
        "fieldsToInclude": "videoId,channelId, publishedAt, "
      },
      "typeVersion": 1
    },
    {
      "id": "2d29fd18-f796-4e40-aeb0-4af21a4939b5",
      "name": "拆分输出2",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        416,
        -448
      ],
      "parameters": {
        "include": "selectedOtherFields",
        "options": {},
        "fieldToSplitOut": "items.snippet.channelId",
        "fieldsToInclude": "items.snippet.channelId, items.snippet.publishedAt, items.id.videoId"
      },
      "typeVersion": 1
    },
    {
      "id": "32b9f4a4-87cc-4638-a67e-8cf1b2a6e334",
      "name": "获取视频统计",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        -448
      ],
      "parameters": {
        "url": "https://www.googleapis.com/youtube/v3/videos?",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "key",
              "value": "={{ $('Setup').item.json.GoogleAPIkey }}"
            },
            {
              "name": "part",
              "value": "snippet,statistics"
            },
            {
              "name": "id",
              "value": "={{ $json['items.id.videoId'] }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5c09783e-2f84-4705-ab5d-e14b3bf32a80",
      "name": "频道信息",
      "type": "n8n-nodes-base.code",
      "position": [
        832,
        -624
      ],
      "parameters": {
        "jsCode": "const output = [];\n\n\nfor (const item of items) {\n  \n  const channelData = item.json;\n\n  \n  if (channelData.items && channelData.items.length > 0) {\n    const channel = channelData.items[0];\n    output.push({\n      channelName: channel.snippet.title,\n      channelID: channel.id,\n      channelOpenDate: channel.snippet.publishedAt,\n      channelTotalViewCount: parseInt(channel.statistics.viewCount,10),\n      subscriberCount: parseInt(channel.statistics.subscriberCount,10),\n    });\n  }\n}\n\nreturn output;"
      },
      "typeVersion": 2
    },
    {
      "id": "fc0823b9-890b-4f0f-beb2-03a18b5e7a97",
      "name": "视频统计",
      "type": "n8n-nodes-base.code",
      "position": [
        832,
        -448
      ],
      "parameters": {
        "jsCode": "const output = [];\n\n\nconst youtubeCategories = {\n  \"1\": \"Film & Animation\",\n  \"2\": \"Autos & Vehicles\",\n  \"10\": \"Music\",\n  \"15\": \"Pets & Animals\",\n  \"17\": \"Sports\",\n  \"18\": \"Short Movies\",\n  \"19\": \"Travel & Events\",\n  \"20\": \"Gaming\",\n  \"21\": \"Videoblogging\",\n  \"22\": \"People & Blogs\",\n  \"23\": \"Comedy\",\n  \"24\": \"Entertainment\",\n  \"25\": \"News & Politics\",\n  \"26\": \"Howto & Style\",\n  \"27\": \"Education\",\n  \"28\": \"Science & Technology\",\n  \"29\": \"Nonprofits & Activism\",\n  \"30\": \"Movies\",\n  \"31\": \"Anime/Animation\",\n  \"32\": \"Action/Adventure\",\n  \"33\": \"Classics\",\n  \"34\": \"Comedy\",\n  \"35\": \"Documentary\",\n  \"36\": \"Drama\",\n  \"37\": \"Family\",\n  \"38\": \"Foreign\", // Note: YouTube's own categories can have overlaps or changes\n  \"39\": \"Horror\",\n  \"40\": \"Sci-Fi/Fantasy\",\n  \"41\": \"Thriller\",\n  \"42\": \"Shorts\",\n  \"43\": \"Shows\",\n  \"44\": \"Trailers\"\n};\n\nfor (const item of items) {\n\n  const videoData = item.json;\n\n  if (videoData.items && videoData.items.length > 0) {\n    const video = videoData.items[0]; \n    output.push({\n      title:video.snippet.title,      \n      videoId:video.id,\n      channelID: video.snippet.channelId,\n      categoryID: video.snippet.categoryId,\n      categoryName: youtubeCategories[video.snippet.categoryId] || \"Unknown Category\",\n\n      ViewCount: parseInt(video.statistics.viewCount,10),\n      favoriteCount: parseInt(video.statistics.favoriteCount,10),\n      likeCount: parseInt(video.statistics.likeCount,10),\n      commentCount: parseInt(video.statistics.commentCount,10),\n      publishedAt:video.snippet.publishedAt,\n\n    });\n  }\n}\n\nreturn output;"
      },
      "typeVersion": 2
    },
    {
      "id": "a543b4f8-19fb-44fd-af5d-d4dd506814d8",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        1088,
        -464
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "fieldsToMatchString": "channelID"
      },
      "typeVersion": 3.2
    },
    {
      "id": "f77017ff-a348-4011-8e6d-d3471ba527c0",
      "name": "算法提升分数",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        -144
      ],
      "parameters": {
        "jsCode": "const output = [];\nconst currentTimestamp = Date.now(); // Get current timestamp in milliseconds\n\nfor (const item of items) {\n  \n  const videoData = item.json;\n\n  const channelId = videoData.channelId; \n  const subscriberCount = Number(videoData.subscriberCount || 0);\n  const videoViews = Number(videoData['views'] || 0); \n  const numberOfLikes = Number(videoData['likes'] || 0); \n  const numberOfComments = Number(videoData['comments'] || 0);\n  const videoPublishedAt = videoData.publishedAt; \n\n\n  // --- 1. Calculate hoursSincePublished ---\n  let hoursSincePublished;\n  try {\n    const publishedDate = new Date(videoPublishedAt);\n    if (isNaN(publishedDate.getTime())) {\n      throw new Error(`Invalid videoPublishedAt date: \"${videoPublishedAt}\"`);\n    }\n    hoursSincePublished = (currentTimestamp - publishedDate.getTime()) / (1000 * 60 * 60);\n    \n    hoursSincePublished = Math.max(1, hoursSincePublished);\n  } catch (e) {\n    \n    hoursSincePublished = 1; // Default to 1 hour if date is invalid or missing\n  }\n  \n\n  // --- 2. Calculate viewsPerHour ---\n  const viewsPerHour = videoViews / hoursSincePublished;\n  \n  // --- 3. Handle effectiveSubscriberCount ---\n  const effectiveSubscriberCount = Math.max(1, subscriberCount); // Avoid division by zero\n  \n  // --- 4. Calculate Views_Per_Subscriber ---\n  const viewsPerSubscriber = videoViews / effectiveSubscriberCount;\n\n  // --- 5. Calculate Relative_Engagement_Rate ---\n  let likeRate = 0;\n  let commentRate = 0;\n  if (videoViews > 0) { // Only calculate rates if there are views to avoid division by zero\n    likeRate = numberOfLikes / videoViews;\n    commentRate = numberOfComments / videoViews;\n  }\n  const relativeEngagementRate = (likeRate + commentRate) * 100;\n\n\n  // --- 6. Calculate Log_Views_Per_Hour (for Normalized_Views_Per_Hour) ---\n  const logViewsPerHour = Math.log10(viewsPerHour + 1); // Add 1 to handle 0 gracefully\n  \n\n  // --- 7. Calculate Algorithmic_Lift_Score (ALS) ---\n  const W1 = 0.6; // Weight for Views_Per_Subscriber\n  const W2 = 0.3; // Weight for Relative_Engagement_Rate\n  const W3 = 0.1; // Weight for Log_Views_Per_Hour\n\n  const algorithmicLiftScore =\n    (W1 * viewsPerSubscriber) +\n    (W2 * relativeEngagementRate) +\n    (W3 * logViewsPerHour);\n\n  // Add the calculated score and other relevant data to the output\n  output.push({\n    json: {\n      ...videoData, // Keep all original data\n      algorithmicLiftScore: algorithmicLiftScore,\n      relativeEngagementRate: relativeEngagementRate,\n      logViewsPerHour: logViewsPerHour,\n      hoursSincePublished: hoursSincePublished,\n      viewsPerHour: viewsPerHour,\n      viewsPerSubscriber: viewsPerSubscriber,\n      likeRate: likeRate,\n      commentRate: commentRate\n    },\n  });\n}\n\nreturn output;"
      },
      "typeVersion": 2
    },
    {
      "id": "12fab598-4dcc-4b5a-8de0-f282dfe912e1",
      "name": "设置",
      "type": "n8n-nodes-base.set",
      "position": [
        -64,
        -448
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c052c179-7918-467f-9fa8-4a4d0e2a1df0",
              "name": "query",
              "type": "string",
              "value": "AIvideo"
            },
            {
              "id": "a40f07ae-3312-4118-b1b1-05bca0b43dd1",
              "name": "GoogleAPIkey",
              "type": "string",
              "value": ""
            },
            {
              "id": "3157a6c2-172e-4a1c-93c0-c99a527d4fc0",
              "name": "daysback",
              "type": "number",
              "value": 3
            },
            {
              "id": "33364ded-dc2e-441c-9cdf-3be3dcecac56",
              "name": "maxResult",
              "type": "number",
              "value": 20
            },
            {
              "id": "6dbb8d3a-e95e-4c1e-8b03-45c7f26408f9",
              "name": "email",
              "type": "string",
              "value": ""
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "28bf5ada-6880-4de8-a9ec-a1a3aad7ab31",
      "name": "删除重复项",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        -48,
        -144
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "1ded0269-047c-4c4d-a923-d36e2c4ef6f4",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -1136
      ],
      "parameters": {
        "color": 4,
        "width": 416,
        "height": 480,
        "content": "### **主要概览**"
      },
      "typeVersion": 1
    },
    {
      "id": "a66fd69c-4657-4dd5-8ffc-0388823bfb1f",
      "name": "限制",
      "type": "n8n-nodes-base.limit",
      "position": [
        592,
        -144
      ],
      "parameters": {
        "maxItems": 5
      },
      "typeVersion": 1
    },
    {
      "id": "9631c00a-9440-42e7-aaae-15fb11163292",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        720,
        -144
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "c2a0b8d8-a7b3-4b7e-a9ba-e4ac319bbfa7",
      "name": "Markdown",
      "type": "n8n-nodes-base.markdown",
      "position": [
        1232,
        -144
      ],
      "parameters": {
        "mode": "markdownToHtml",
        "options": {},
        "markdown": "={{ $json.output }}"
      },
      "typeVersion": 1
    },
    {
      "id": "db2e6eb2-24ca-4cf7-895e-4fba6f70b33c",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        -1136
      ],
      "parameters": {
        "width": 656,
        "height": 480,
        "content": "### **1- 设置节点配置**"
      },
      "typeVersion": 1
    },
    {
      "id": "98a83c31-aaf3-489a-9209-85747dc67ecd",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        -1136
      ],
      "parameters": {
        "width": 656,
        "height": 480,
        "content": "### **2- AI 模型设置**"
      },
      "typeVersion": 1
    },
    {
      "id": "f57223a9-f021-4dd5-9bc9-b59ef73188df",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        -1136
      ],
      "parameters": {
        "width": 656,
        "height": 480,
        "content": "### **3- Gmail 账户设置**"
      },
      "typeVersion": 1
    },
    {
      "id": "dd7a3947-55e0-4077-8f99-dacb48f9a123",
      "name": "发送报告",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1440,
        -144
      ],
      "webhookId": "6fbdf951-0234-4af0-b88a-72c4a0bd7c4f",
      "parameters": {
        "sendTo": "={{$('Setup').item.json.email}}",
        "message": "={{ $json.data }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "=Virality analysis of the last {{ $('Setup').item.json.daysback }} days for keyword: \"{{ $('Setup').item.json.query }}\""
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "85MkbBJIFpUk11Ka",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    }
  ],
  "pinData": {},
  "connections": {
    "Sort": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Remove_Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Setup": {
      "main": [
        [
          {
            "node": "SearchVideos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Markdown": {
      "main": [
        [
          {
            "node": "Send_Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "VidStats": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Split Out2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out2": {
      "main": [
        [
          {
            "node": "GetChannelInfo",
            "type": "main",
            "index": 0
          },
          {
            "node": "GetVidStats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ChannelInfo": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetVidStats": {
      "main": [
        [
          {
            "node": "VidStats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send_Report": {
      "main": [
        []
      ]
    },
    "SearchVideos": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetChannelInfo": {
      "main": [
        [
          {
            "node": "ChannelInfo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CalculateMetrics": {
      "main": [
        [
          {
            "node": "AlgorithmicLiftScore",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Setup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Remove_Duplicates": {
      "main": [
        [
          {
            "node": "CalculateMetrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AlgorithmicLiftScore": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Setup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 杂项, AI 摘要总结, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
高级
节点数量26
分类3
节点类型17
难度说明

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

作者
gclbck

gclbck

@gclbck

Seasoned Data&ML Engineer over 20 years of experience in data processing, analytics and CRM. Non-Stop learner, Passionate in efficiency through Agentic Automation.

外部链接
在 n8n.io 查看

分享此工作流