{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "75d2ef4f-57a8-4835-884a-fbc04936082e",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        176
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 1
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e6861d30-04c7-45b7-b66d-c1e2cea3d4d0",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        336
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 2
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5e5ea0a0-f048-41af-89b0-e4e59ed29579",
      "name": "Schedule Trigger2",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        480
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 3
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "617c5270-04f6-4a4c-b7e6-4ae80ab57bac",
      "name": "Schedule Trigger3",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        656
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 4
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5b51d974-b3bb-4d1d-b9c8-9f25578f06b3",
      "name": "Schedule Trigger4",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 1
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b547f2fb-902c-4eeb-851a-3a7453f35385",
      "name": "Schedule Trigger5",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        -144
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4c15f402-9179-4eb4-a712-de7c40c156da",
      "name": "Schedule Trigger6",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        496,
        816
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 5
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "46ecbb2a-e1c3-4369-94f5-0c287ba18382",
      "name": "Structured Output Parser1",
      "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\u2705 Video Idea Structure (For Each Trend):\n\ud83d\udd25 {Trend Title}\n\ud83c\udf10 Platform: TikTok / IG Reels / YouTube Shorts\n\ud83d\udcca Trend Type: {Viral sound, challenge, POV, or niche trend}\n\ud83d\udcc8 Trend Stats: {e.g., \u201c5.2M posts in 24h\u201d, \u201cGrowing in 3+ countries\u201d}\n\ud83e\udde0 Hook Idea: {The hook that grabs attention in the first 3 seconds}\n\ud83d\udca1 Key Point #1: {Why this is trending and why your audience cares}\n\ud83d\udca5 Key Point #2: {Engaging visual or challenge idea}\n\ud83c\udfaf Call to Action (CTA): {What you want your audience to do \u2013 e.g., \u201cDuet this video!\u201d}\n\n\u2705 Example:\npart_1:\n\njson\nCopy\nEdit\n{\n  \"part_1\": \"\ud83d\udd25 [Soundbite Magic Trend](https://tiktok.com/xyz)\\n\ud83c\udf10 **Platform**: TikTok\\n\ud83d\udcca **Trend Type**: Viral Sound\\n\ud83d\udcc8 **Stats**: 5M uses in the last 24 hours\\n\ud83e\udde0 **Hook Idea**: *\u201cStart your video with a dramatic zoom-in and slow-mo effect as the sound hits\u201d*\\n\ud83d\udca1 **Key Point #1**: *This sound creates tension and excitement. Perfect for a 'before & after' transformation video* \\n\ud83d\udca5 **Key Point #2**: *Use bold captions with an engaging twist to create curiosity* \\n\ud83c\udfaf **Call to Action**: *\u201cTry this sound with your own transformation!\u201d*\\n**\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501**\"\n}\npart_2:\n\njson\nCopy\nEdit\n{\n  \"part_2\": \"\ud83d\udd25 [POV Reactions Challenge](https://tiktok.com/xyz)\\n\ud83c\udf10 **Platform**: TikTok\\n\ud83d\udcca **Trend Type**: POV Challenge\\n\ud83d\udcc8 **Stats**: 2M+ reactions, trending this week\\n\ud83e\udde0 **Hook Idea**: *\u201cWhat happens when you walk into the room and unexpectedly see your dream job?\u201d*\\n\ud83d\udca1 **Key Point #1**: *Use exaggerated reactions for comic effect. The unexpected twist keeps viewers hooked* \\n\ud83d\udca5 **Key Point #2**: *Pair with a trending sound or meme format for relatability* \\n\ud83c\udfaf **Call to Action**: *\u201cDuet with your reaction to this POV!\u201d*\\n**\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501**\"\n}\npart_3:\n\njson\nCopy\nEdit\n{\n  \"part_3\": \"\ud83d\udd25 [DIY Lifehack Trend](https://tiktok.com/xyz)\\n\ud83c\udf10 **Platform**: YouTube Shorts\\n\ud83d\udcca **Trend Type**: DIY Lifehack\\n\ud83d\udcc8 **Stats**: 8.7M views in 48 hours\\n\ud83e\udde0 **Hook Idea**: *\u201cHere's a 30-second lifehack that will change the way you organize your home\u201d*\\n\ud83d\udca1 **Key Point #1**: *Keep it simple, yet surprising\u2014show an effective hack for everyday problems* \\n\ud83d\udca5 **Key Point #2**: *Add a touch of humor to keep the audience engaged and shareable* \\n\ud83c\udfaf **Call to Action**: *\u201cTag someone who needs this hack!\u201d*\\n**\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501**\"\n}\n\u2705 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\u2019s message limit\n\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "370630ab-2d0f-4c05-ae5a-bdc37a0d1490",
      "name": "OpenAI Chat Model2",
      "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
      ],
      "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\ud83d\udcb0"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "1332673633965051914",
          "cachedResultUrl": "https://discord.com/channels/1236784625196601386/1332673633965051914",
          "cachedResultName": "\ud83d\udcc8\u2502trend-tracker"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e7835c0c-0413-4960-b02e-5a708915c15a",
      "name": "HTTP Request",
      "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
      ],
      "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\ud83d\udcb0"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "1332673633965051914",
          "cachedResultUrl": "https://discord.com/channels/1236784625196601386/1332673633965051914",
          "cachedResultName": "\ud83d\udcc8\u2502trend-tracker"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e4cf6c87-2031-4f96-8541-66f98481a168",
      "name": "Discord1",
      "type": "n8n-nodes-base.discord",
      "position": [
        2384,
        320
      ],
      "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\ud83d\udcb0"
        },
        "options": {},
        "resource": "message",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "1332673633965051914",
          "cachedResultUrl": "https://discord.com/channels/1236784625196601386/1332673633965051914",
          "cachedResultName": "\ud83d\udcc8\u2502trend-tracker"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "710b9fe6-88a3-408e-a212-722930b02962",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        496,
        -304
      ],
      "parameters": {
        "inputSource": "passthrough"
      },
      "typeVersion": 1.1
    },
    {
      "id": "43ab7740-c582-4cdf-bf75-dbf53fb521a2",
      "name": "Workflow Summary",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        -256
      ],
      "parameters": {
        "color": 0,
        "width": 500,
        "height": 600,
        "content": "## Workflow Overview\n\nThis workflow is designed to automatically generate and post short-form video ideas to a Discord channel based on current social media trends.  It fetches trend data, processes it using an AI, and then sends the results in parts to a specified Discord channel."
      },
      "typeVersion": 1
    },
    {
      "id": "2f426e92-689f-4ac4-a57e-96bd66d592e4",
      "name": "Setup Note 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -64
      ],
      "parameters": {
        "width": 400,
        "height": 500,
        "content": "## Note 1: Note 1: This node acts as a trigger, initiating the workflow when another workflow executes it.  This allows external control over when the trend analysis begins."
      },
      "typeVersion": 1
    },
    {
      "id": "8ad6b592-09eb-4366-9fb9-6b212e3a85ea",
      "name": "Setup Note 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -64
      ],
      "parameters": {
        "color": 2,
        "width": 400,
        "height": 500,
        "content": "## Note 2: Note 2: An HTTP Request node fetches social media trend data from a specified URL. The URL points to a website providing trend information (in this case, social-searcher.com).  Multiple schedule triggers are present to run this process at different times of the day."
      },
      "typeVersion": 1
    },
    {
      "id": "4348ff80-3071-41b2-b5c4-8fada9ff4cfc",
      "name": "Setup Note 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        -64
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 500,
        "content": "## Note 3: Note 3: An AI Agent node processes the retrieved trend data.  It uses a specified Large Language Model (OpenAI) and prompt to generate video ideas tailored for short-form video platforms. The output is structured into three parts for easier posting."
      },
      "typeVersion": 1
    },
    {
      "id": "aa1f5d87-1f92-4b53-bef8-7d41e4152c2e",
      "name": "Setup Note 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        -64
      ],
      "parameters": {
        "color": 4,
        "width": 400,
        "height": 500,
        "content": "## Note 4: Note 4: Three Discord nodes post the three parts of the AI's output (video ideas) to a specific Discord channel. Each node sends one part of the structured response from the AI agent."
      },
      "typeVersion": 1
    },
    {
      "id": "3e5a2abd-269a-46a2-bb00-e03d4d06a3dd",
      "name": "Setup Note 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2720,
        -64
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 500,
        "content": "## Note 5: Note 5: An OpenAI Chat Model node acts as the language model for the AI Agent.  It's configured to use a specific OpenAI model ('gpt-4o-mini'), requiring an appropriate OpenAI API key to function."
      },
      "typeVersion": 1
    }
  ],
  "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
          }
        ]
      ]
    }
  }
}