{
  "name": "Automate VIRAL Youtube titles & thumbnails creation (FLUX.1 + Apify)",
  "nodes": [
    {
      "id": "",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -680,
        20
      ]
    },
    {
      "id": "",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        2940,
        -240
      ]
    },
    {
      "id": "",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        120,
        20
      ]
    },
    {
      "id": "",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -40,
        220
      ]
    },
    {
      "id": "",
      "name": "Create Keywords",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -240,
        20
      ]
    },
    {
      "id": "",
      "name": "YTB Search Scrape",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        340,
        20
      ]
    },
    {
      "id": "",
      "name": "Get DataSet",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        0
      ]
    },
    {
      "id": "",
      "name": "Mistral Cloud Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        -240,
        220
      ]
    },
    {
      "id": "",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        900,
        20
      ]
    },
    {
      "id": "",
      "name": "Check IF Finished",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        680,
        20
      ]
    },
    {
      "id": "",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        1060,
        200
      ]
    },
    {
      "id": "",
      "name": "Mistral Cloud Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        2520,
        0
      ]
    },
    {
      "id": "",
      "name": "Calculate CTR",
      "type": "n8n-nodes-base.code",
      "position": [
        1520,
        200
      ]
    },
    {
      "id": "",
      "name": "Merge Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        1700,
        20
      ]
    },
    {
      "id": "",
      "name": "Create Titles",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        3140,
        -240
      ]
    },
    {
      "id": "",
      "name": "Mistral Cloud Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        3060,
        20
      ]
    },
    {
      "id": "",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3340,
        20
      ]
    },
    {
      "id": "",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -980
      ],
      "parameters": {
        "width": 780,
        "height": 320,
        "content": "## How this is Working ?\n**1 -** Enter your content idea in the Edit Fields node in a \"raw\" format. Ex : Boil Eggs Perfectly\n**2 -** LLM create 3 keywords request based on the idea and Apify scrape th"
      }
    },
    {
      "id": "",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -640
      ],
      "parameters": {
        "width": 780,
        "height": 520,
        "content": "## SETUP\n\n**Setup Input Content Idea :** Enter Keyword Related to the niche you want. Trigger can be replaced with anything as long as you retrieve a content idea. For example : Form submission, Datab"
      }
    },
    {
      "id": "",
      "name": "Content Idea",
      "type": "n8n-nodes-base.set",
      "position": [
        -460,
        20
      ]
    },
    {
      "id": "",
      "name": "Create List of Titles",
      "type": "n8n-nodes-base.code",
      "position": [
        2380,
        -240
      ]
    },
    {
      "id": "",
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        3800,
        40
      ]
    },
    {
      "id": "",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2260,
        520
      ]
    },
    {
      "id": "",
      "name": "Analyze Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2500,
        540
      ]
    },
    {
      "id": "",
      "name": "Wait3",
      "type": "n8n-nodes-base.wait",
      "position": [
        2780,
        720
      ]
    },
    {
      "id": "",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        3580,
        40
      ]
    },
    {
      "id": "",
      "name": "Mistral Cloud Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        2680,
        460
      ]
    },
    {
      "id": "",
      "name": "Create Prompt",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2620,
        280
      ]
    },
    {
      "id": "",
      "name": "Create List of Analysis",
      "type": "n8n-nodes-base.code",
      "position": [
        2440,
        280
      ]
    },
    {
      "id": "",
      "name": "Generate Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3120,
        280
      ]
    },
    {
      "id": "",
      "name": "Convert to Base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        3320,
        280
      ]
    },
    {
      "id": "",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -100
      ],
      "parameters": {
        "width": 460,
        "height": 360,
        "content": "## 1- Input\nEnter your content idea in the Edit Fields node in a \"raw\" format. Ex : Boil Eggs Perfectly"
      }
    },
    {
      "id": "",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        -100
      ],
      "parameters": {
        "width": 820,
        "height": 480,
        "content": "## 2- Create DataSet\nLLM create 3 keywords request based on the idea and Apify scrape the YTB Search"
      }
    },
    {
      "id": "",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -100
      ],
      "parameters": {
        "width": 680,
        "height": 520,
        "content": "## 3 - Wait for DataSet Completion\nWait until the dataset is completed in Apify"
      }
    },
    {
      "id": "",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1260,
        -100
      ],
      "parameters": {
        "width": 860,
        "height": 460,
        "content": "## 4- Filter Performing Videos\nRetrieve Dataset from Apify, calculate approximation of CTR and filter top performing videos"
      }
    },
    {
      "id": "",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        -340
      ],
      "parameters": {
        "width": 1340,
        "height": 500,
        "content": "## 5- Generate Titles\nLLM analyze patterns of best performing titles and create a prompt based on it. Another LLM create 5 titles based on these criteria"
      }
    },
    {
      "id": "",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        180
      ],
      "parameters": {
        "width": 1340,
        "height": 760,
        "content": "## 6- Generate Thumbnail\nLLM analyze patterns of best performing thumbnails and create a prompt based on it. Another LLM create 1 thumbnail based on these criteria"
      }
    },
    {
      "id": "",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3500,
        -100
      ],
      "parameters": {
        "width": 520,
        "height": 360,
        "content": "## 7- Output\nReturn titles and thumbnail in a HTML Page"
      }
    },
    {
      "id": "",
      "name": "Keep Top Performing Videos",
      "type": "n8n-nodes-base.filter",
      "position": [
        1900,
        20
      ]
    },
    {
      "id": "",
      "name": "Analyze Pattern & Create Prompt",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2600,
        -240
      ]
    },
    {
      "id": "",
      "name": "Wait4",
      "type": "n8n-nodes-base.wait",
      "position": [
        2940,
        280
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Get DataSet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Create Titles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "YTB Search Scrape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Check IF Finished",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait3": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait4": {
      "main": [
        [
          {
            "node": "Generate Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Data": {
      "main": [
        [
          {
            "node": "Keep Top Performing Videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get DataSet": {
      "main": [
        [
          {
            "node": "Calculate CTR",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content Idea": {
      "main": [
        [
          {
            "node": "Create Keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Image": {
      "main": [
        [
          {
            "node": "Wait3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate CTR": {
      "main": [
        [
          {
            "node": "Merge Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Create Prompt": {
      "main": [
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Titles": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image": {
      "main": [
        [
          {
            "node": "Convert to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Keywords": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Create List of Analysis",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Analyze Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check IF Finished": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Base64": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "YTB Search Scrape": {
      "main": [
        [
          {
            "node": "Check IF Finished",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create List of Titles": {
      "main": [
        [
          {
            "node": "Analyze Pattern & Create Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create List of Analysis": {
      "main": [
        [
          {
            "node": "Create Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Create Keywords",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Create Keywords",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Pattern & Create Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Create Titles",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Create Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Create Titles",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Keep Top Performing Videos": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create List of Titles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Pattern & Create Prompt": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Content Idea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}