{
  "name": "Turn BBC News articles into podcasts using Hugging Face and Google Gemini",
  "nodes": [
    {
      "id": "95c798a4-bc34-4219-b7c3-6b4a4070886b",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -320,
        1080
      ]
    },
    {
      "id": "09987590-1ec2-48d4-aa04-32b85addd9e6",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        420,
        1080
      ]
    },
    {
      "id": "758e3f60-01dc-46c7-bb53-7460eaed92e3",
      "name": "Extract News Block",
      "type": "n8n-nodes-base.html",
      "position": [
        220,
        1080
      ]
    },
    {
      "id": "20440f9a-a40c-4419-af6d-383de041d078",
      "name": "Extract News Content",
      "type": "n8n-nodes-base.html",
      "position": [
        600,
        1080
      ]
    },
    {
      "id": "47a50ada-127a-4037-8fe7-41c0caebb3de",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2000,
        1060
      ]
    },
    {
      "id": "33050a43-842d-464d-b227-a6c2c870c0af",
      "name": "Fetch BBC News Detail",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1400,
        1060
      ]
    },
    {
      "id": "646bfe6b-cac6-4177-9b59-dc205b44b7eb",
      "name": "Extract Detail",
      "type": "n8n-nodes-base.html",
      "position": [
        1600,
        1060
      ]
    },
    {
      "id": "6e14f528-1e94-411f-8601-3c713d492aa9",
      "name": "Filter Empty Detail",
      "type": "n8n-nodes-base.filter",
      "position": [
        1800,
        1060
      ]
    },
    {
      "id": "5863e420-2392-468a-8e03-5d4c273168e0",
      "name": "If script exists",
      "type": "n8n-nodes-base.if",
      "position": [
        2620,
        1060
      ]
    },
    {
      "id": "90b370d3-5712-401d-b769-490014e2b17c",
      "name": "Basic Podcast LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2200,
        1060
      ]
    },
    {
      "id": "24c212c2-6d06-4fe1-841b-bc52a21060b1",
      "name": "Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1600,
        1600
      ]
    },
    {
      "id": "02e9f1ee-dc80-403c-8c19-0e6f918cf8ed",
      "name": "Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2360,
        1280
      ]
    },
    {
      "id": "395ddac7-b2a4-48c5-b2d3-d21078d29c54",
      "name": "News Classifier",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        980,
        1080
      ]
    },
    {
      "id": "13fac9ed-688c-4af9-a810-d49a74b98c22",
      "name": "Fetch BBC News Page",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -60,
        1080
      ]
    },
    {
      "id": "e2aa33f3-aa7c-4a9d-ac3c-32f9f5872606",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        920
      ],
      "parameters": {
        "width": 500,
        "height": 340,
        "content": "## This node fetches the main BBC News page, which contains links to various news articles."
      }
    },
    {
      "id": "0821b944-44cb-41ed-b5ff-70f99018c5dc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        840
      ],
      "parameters": {
        "width": 340,
        "height": 360,
        "content": "## This node uses a Gemini LLM to classify news articles based on their titles and descriptions. It determines if the content is suitable for a podcast.\n\n"
      }
    },
    {
      "id": "d32b2ebb-0a4d-4d27-9262-894ab7a65cce",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        820
      ],
      "parameters": {
        "width": 400,
        "height": 420,
        "content": "## This node fetches the detailed content of the news articles that were classified as suitable for a podcast."
      }
    },
    {
      "id": "e6e1d180-b2c2-4b62-a611-7c039037ed69",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2180,
        880
      ],
      "parameters": {
        "width": 340,
        "height": 320,
        "content": "## This node uses a Gemini LLM to convert the news articles into a podcast script.\n"
      }
    },
    {
      "id": "d8776355-967d-4875-b948-25792f6f38ec",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2840,
        920
      ],
      "parameters": {
        "width": 360,
        "height": 300,
        "content": "##  It structures the script for direct use with the Hugging Face text-to-speech model."
      }
    },
    {
      "id": "631a2caf-c640-41df-9215-2b542de51ccb",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        740
      ],
      "parameters": {
        "width": 460,
        "height": 280,
        "content": "## 3rd Party Application Requirements:\n\n### Gemini \nYou've already set up a Gemini LLM. No access token is needed for this.\n### Hugging Face\n You'll need an access token for the Hugging Face text-to-s"
      }
    },
    {
      "id": "655e6799-5b7c-4747-b3a9-d01b47f5cba8",
      "name": "Limit 10 Items",
      "type": "n8n-nodes-base.limit",
      "position": [
        800,
        1080
      ]
    },
    {
      "id": "64d011d2-9c51-4f1f-a3b8-edf3fcbc6710",
      "name": "Hugging Face Text-to-Speech.",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2900,
        1060
      ]
    }
  ],
  "connections": {
    "Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "News Classifier",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Basic Podcast LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Basic Podcast LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Extract News Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Basic Podcast LLM Chain",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Extract Detail": {
      "main": [
        [
          {
            "node": "Filter Empty Detail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit 10 Items": {
      "main": [
        [
          {
            "node": "News Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "News Classifier": {
      "main": [
        [
          {
            "node": "Fetch BBC News Detail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If script exists": {
      "main": [
        [
          {
            "node": "Hugging Face Text-to-Speech.",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Extract News Block": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch BBC News Page": {
      "main": [
        [
          {
            "node": "Extract News Block",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Empty Detail": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract News Content": {
      "main": [
        [
          {
            "node": "Limit 10 Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch BBC News Detail": {
      "main": [
        [
          {
            "node": "Extract Detail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic Podcast LLM Chain": {
      "main": [
        [
          {
            "node": "If script exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Fetch BBC News Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}