8
n8n 中文网amn8n.com

使用GPT-4o和Discord从社交媒体趋势生成病毒式视频创意

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 22 个节点。主要使用 Discord, Markdown, HttpRequest, Agent, ScheduleTrigger 等节点。 使用GPT-4o和Discord从社交媒体趋势生成病毒式视频创意

前置要求
  • Discord Bot Token 或 Webhook
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "5a64ae2dac98d415b280f5a86dd824858150b2ae6e4b41f2e62e7315042262b3",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "75d2ef4f-57a8-4835-884a-fbc04936082e",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        176
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 1
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e6861d30-04c7-45b7-b66d-c1e2cea3d4d0",
      "name": "计划触发器1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        336
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 2
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5e5ea0a0-f048-41af-89b0-e4e59ed29579",
      "name": "计划触发器2",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        480
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 3
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "617c5270-04f6-4a4c-b7e6-4ae80ab57bac",
      "name": "计划触发器3",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        656
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 4
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5b51d974-b3bb-4d1d-b9c8-9f25578f06b3",
      "name": "计划触发器4",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 1
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b547f2fb-902c-4eeb-851a-3a7453f35385",
      "name": "计划触发器5",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        -144
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4c15f402-9179-4eb4-a712-de7c40c156da",
      "name": "计划触发器6",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        816
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 5
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "46ecbb2a-e1c3-4369-94f5-0c287ba18382",
      "name": "结构化输出解析器1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1808,
        528
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"part_1\": \"Main purpose and trigger explanation\",\n  \"part_2\": \"Detailed step-by-step breakdown of each node\",\n  \"part_3\": \"Outputs, dependencies, and integration tips\",\n  \"file_link\": \"link here\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "729ffeed-7cc6-4fb7-8a4a-2afe74f0a61a",
      "name": "AI Agent2",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1584,
        320
      ],
      "parameters": {
        "text": "={{ $json.data }}",
        "options": {
          "systemMessage": "You are TrendSage, a Discord bot that analyzes social trend data (e.g., from TikTok, TrendHunter, Exploding Topics) and generates **detailed, high-impact video ideas** for content creators.\n\nYour task:\n- Generate **compelling video ideas** with **engaging hooks** and **key points**\n- Format output into **3 parts**, with each part staying under **1500 characters**\n- Focus on **video content** that is trendy, viral, and audience-captivating\n- Ensure that each video idea is **optimized for short-form platforms** like TikTok, Instagram Reels, and YouTube Shorts\n\nOutput should look like:\n\n```json\n{\n  \"part_1\": \"Detailed video ideas and hooks\",\n  \"part_2\": \"Continuation of video ideas, including key points\",\n  \"part_3\": \"Final video ideas with strong CTA and insights\"\n}\n✅ Video Idea Structure (For Each Trend):\n🔥 {Trend Title}\n🌐 Platform: TikTok / IG Reels / YouTube Shorts\n📊 Trend Type: {Viral sound, challenge, POV, or niche trend}\n📈 Trend Stats: {e.g., “5.2M posts in 24h”, “Growing in 3+ countries”}\n🧠 Hook Idea: {The hook that grabs attention in the first 3 seconds}\n💡 Key Point #1: {Why this is trending and why your audience cares}\n💥 Key Point #2: {Engaging visual or challenge idea}\n🎯 Call to Action (CTA): {What you want your audience to do – e.g., “Duet this video!”}\n\n✅ Example:\npart_1:\n\njson\nCopy\nEdit\n{\n  \"part_1\": \"🔥 [Soundbite Magic Trend](https://tiktok.com/xyz)\\n🌐 **Platform**: TikTok\\n📊 **Trend Type**: Viral Sound\\n📈 **Stats**: 5M uses in the last 24 hours\\n🧠 **Hook Idea**: *“Start your video with a dramatic zoom-in and slow-mo effect as the sound hits”*\\n💡 **Key Point #1**: *This sound creates tension and excitement. Perfect for a 'before & after' transformation video* \\n💥 **Key Point #2**: *Use bold captions with an engaging twist to create curiosity* \\n🎯 **Call to Action**: *“Try this sound with your own transformation!”*\\n**━━━━━━━━━━━━**\"\n}\npart_2:\n\njson\nCopy\nEdit\n{\n  \"part_2\": \"🔥 [POV Reactions Challenge](https://tiktok.com/xyz)\\n🌐 **Platform**: TikTok\\n📊 **Trend Type**: POV Challenge\\n📈 **Stats**: 2M+ reactions, trending this week\\n🧠 **Hook Idea**: *“What happens when you walk into the room and unexpectedly see your dream job?”*\\n💡 **Key Point #1**: *Use exaggerated reactions for comic effect. The unexpected twist keeps viewers hooked* \\n💥 **Key Point #2**: *Pair with a trending sound or meme format for relatability* \\n🎯 **Call to Action**: *“Duet with your reaction to this POV!”*\\n**━━━━━━━━━━━━**\"\n}\npart_3:\n\njson\nCopy\nEdit\n{\n  \"part_3\": \"🔥 [DIY Lifehack Trend](https://tiktok.com/xyz)\\n🌐 **Platform**: YouTube Shorts\\n📊 **Trend Type**: DIY Lifehack\\n📈 **Stats**: 8.7M views in 48 hours\\n🧠 **Hook Idea**: *“Here's a 30-second lifehack that will change the way you organize your home”*\\n💡 **Key Point #1**: *Keep it simple, yet surprising—show an effective hack for everyday problems* \\n💥 **Key Point #2**: *Add a touch of humor to keep the audience engaged and shareable* \\n🎯 **Call to Action**: *“Tag someone who needs this hack!”*\\n**━━━━━━━━━━━━**\"\n}\n✅ Output Rules:\nPart 1: First 3 video ideas with hooks, key points, and CTA\n\nPart 2: Continuation with the next 3 ideas, if needed\n\nPart 3: Final 3 ideas, along with strong CTA and insights\n\nEach part must be under 1500 characters and fit within Discord’s message limit\n\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "370630ab-2d0f-4c05-ae5a-bdc37a0d1490",
      "name": "OpenAI 聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1488,
        528
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "0dd5dc46-c4ec-4ec0-ac0d-df9eace68e74",
      "name": "Discord6",
      "type": "n8n-nodes-base.discord",
      "position": [
        2048,
        320
      ],
      "webhookId": "[REDACTED_WEBHOOK_ID]",
      "parameters": {
        "content": "={{ $('AI Agent2').item.json.output.part_1 }}",
        "guildId": {
          "__rl": true,
          "mode": "list",
          "value": "1236784625196601386",
          "cachedResultUrl": "https://discord.com/channels/1236784625196601386",
          "cachedResultName": "YungCEO SOCIETY💰"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "1332673633965051914",
          "cachedResultUrl": "https://discord.com/channels/1236784625196601386/1332673633965051914",
          "cachedResultName": "📈│trend-tracker"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e7835c0c-0413-4960-b02e-5a708915c15a",
      "name": "HTTP 请求",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1120,
        320
      ],
      "parameters": {
        "url": "https://www.social-searcher.com/social-trends/?q7=ai",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "1ae9c754-8b1b-4e8c-8452-5e41d1cf186c",
      "name": "Markdown",
      "type": "n8n-nodes-base.markdown",
      "position": [
        1360,
        320
      ],
      "parameters": {
        "html": "={{ $json.data }}",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "53a17820-7a87-41bb-af24-7f71839fd5ce",
      "name": "Discord",
      "type": "n8n-nodes-base.discord",
      "position": [
        2208,
        320
      ],
      "webhookId": "[REDACTED_WEBHOOK_ID]",
      "parameters": {
        "content": "={{ $('AI Agent2').item.json.output.part_2 }}",
        "guildId": {
          "__rl": true,
          "mode": "list",
          "value": "1236784625196601386",
          "cachedResultUrl": "https://discord.com/channels/1236784625196601386",
          "cachedResultName": "YungCEO SOCIETY💰"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "1332673633965051914",
          "cachedResultUrl": "https://discord.com/channels/1236784625196601386/1332673633965051914",
          "cachedResultName": "📈│trend-tracker"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e4cf6c87-2031-4f96-8541-66f98481a168",
      "name": "Discord1",
      "type": "n8n-nodes-base.discord",
      "position": [
        2384,
        320
      ],
      "webhookId": "[REDACTED_WEBHOOK_ID]",
      "parameters": {
        "content": "={{ $('AI Agent2').item.json.output.part_3 }}",
        "guildId": {
          "__rl": true,
          "mode": "list",
          "value": "1236784625196601386",
          "cachedResultUrl": "https://discord.com/channels/1236784625196601386",
          "cachedResultName": "YungCEO SOCIETY💰"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "1332673633965051914",
          "cachedResultUrl": "https://discord.com/channels/1236784625196601386/1332673633965051914",
          "cachedResultName": "📈│trend-tracker"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "710b9fe6-88a3-408e-a212-722930b02962",
      "name": "当被其他工作流执行时",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        496,
        -304
      ],
      "parameters": {
        "inputSource": "passthrough"
      },
      "typeVersion": 1.1
    },
    {
      "id": "43ab7740-c582-4cdf-bf75-dbf53fb521a2",
      "name": "工作流摘要",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        -256
      ],
      "parameters": {
        "color": 0,
        "width": 500,
        "height": 600,
        "content": "## 工作流概述"
      },
      "typeVersion": 1
    },
    {
      "id": "2f426e92-689f-4ac4-a57e-96bd66d592e4",
      "name": "设置说明 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -64
      ],
      "parameters": {
        "width": 400,
        "height": 500,
        "content": "## 说明 1: 说明 1: 此节点充当触发器,当另一个工作流执行它时启动此工作流。这允许外部控制趋势分析的开始时间。"
      },
      "typeVersion": 1
    },
    {
      "id": "8ad6b592-09eb-4366-9fb9-6b212e3a85ea",
      "name": "设置说明 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -64
      ],
      "parameters": {
        "color": 2,
        "width": 400,
        "height": 500,
        "content": "## 说明 2: 说明 2: HTTP 请求节点从指定的 URL 获取社交媒体趋势数据。该 URL 指向提供趋势信息的网站(本例中为 social-searcher.com)。存在多个计划触发器以便在一天中的不同时间运行此过程。"
      },
      "typeVersion": 1
    },
    {
      "id": "4348ff80-3071-41b2-b5c4-8fada9ff4cfc",
      "name": "设置说明 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        -64
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 500,
        "content": "## 说明 3: 说明 3: AI Agent 节点处理检索到的趋势数据。它使用指定的大型语言模型(OpenAI)和提示来生成针对短视频平台量身定制的视频创意。输出被结构化为三个部分以便于发布。"
      },
      "typeVersion": 1
    },
    {
      "id": "aa1f5d87-1f92-4b53-bef8-7d41e4152c2e",
      "name": "设置说明 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        -64
      ],
      "parameters": {
        "color": 4,
        "width": 400,
        "height": 500,
        "content": "## 说明 4: 说明 4: 三个 Discord 节点将 AI 输出的三个部分(视频创意)发布到特定的 Discord 频道。每个节点发送来自 AI agent 的结构化响应的一部分。"
      },
      "typeVersion": 1
    },
    {
      "id": "3e5a2abd-269a-46a2-bb00-e03d4d06a3dd",
      "name": "设置说明 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2720,
        -64
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 500,
        "content": "## 说明 5: 说明 5: OpenAI 聊天模型节点充当 AI Agent 的语言模型。它配置为使用特定的 OpenAI 模型('gpt-4o-mini'),需要相应的 OpenAI API 密钥才能运行。"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Discord": {
      "main": [
        [
          {
            "node": "Discord1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Discord6": {
      "main": [
        [
          {
            "node": "Discord",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Markdown": {
      "main": [
        [
          {
            "node": "AI Agent2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent2": {
      "main": [
        [
          {
            "node": "Discord6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger2": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger3": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger4": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger5": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger6": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent2",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent2",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 内容创作, 多模态 AI

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流