{
  "name": "Convert YouTube videos to audio summaries with Decodo, OpenAI & Telegram",
  "nodes": [
    {
      "id": "811c6105-ea89-443f-a030-ea05cb5c917e",
      "name": "Send Working on it Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        112,
        -160
      ]
    },
    {
      "id": "cdc0417e-b7be-4c54-9834-074b6e502918",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1744,
        64
      ]
    },
    {
      "id": "5f4600db-3bdc-4be6-8f29-49c3ede4c46f",
      "name": "Check for Transcript Error",
      "type": "n8n-nodes-base.if",
      "position": [
        720,
        -160
      ]
    },
    {
      "id": "7ab7dbf3-32c8-4de5-9c69-2b28901f8105",
      "name": "Send Error Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        112,
        64
      ]
    },
    {
      "id": "b4d2ab66-5951-4612-b154-0a99844c0806",
      "name": "Send Transcript Failed Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1104,
        -432
      ]
    },
    {
      "id": "9a768193-4d86-45f6-a8e6-40ab72b67e34",
      "name": "Send Text Summary",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2976,
        -144
      ]
    },
    {
      "id": "c91b2215-c84d-4289-a3c9-bd0be3e5e99d",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -928,
        -48
      ]
    },
    {
      "id": "fe4f3779-421b-4059-a97b-a5fd5c881142",
      "name": "Check: Is Valid URL?",
      "type": "n8n-nodes-base.if",
      "position": [
        -160,
        -48
      ]
    },
    {
      "id": "32f07420-e432-4fa7-927e-622ec069bd96",
      "name": "Decodo (Fetch Transcript)",
      "type": "@decodo/n8n-nodes-decodo.decodo",
      "position": [
        496,
        -160
      ]
    },
    {
      "id": "e4659ed6-073b-4a15-a04b-5cd36828f66e",
      "name": "Code: Format Transcript",
      "type": "n8n-nodes-base.code",
      "position": [
        1120,
        -144
      ]
    },
    {
      "id": "ac225b4f-5923-4415-94b6-7652d3dc6640",
      "name": "AI Summarizer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1584,
        -144
      ]
    },
    {
      "id": "1450bc79-d17f-4b03-9f63-06ae4d4ea174",
      "name": "OpenAI TTS (Create Audio)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2240,
        -144
      ]
    },
    {
      "id": "9e310f82-0404-419d-bc26-6143de3955e1",
      "name": "Send Audio Summary",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2752,
        -144
      ]
    },
    {
      "id": "8f926a5f-2b5c-44bb-b33f-3be5620b8553",
      "name": "Config",
      "type": "n8n-nodes-base.set",
      "position": [
        -592,
        -48
      ]
    },
    {
      "id": "a1a28a7f-6126-4fa3-967c-201d63d36da5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1504,
        -368
      ],
      "parameters": {
        "width": 496,
        "height": 624,
        "content": "## 🎙️ Generate YouTube Audio Summaries: Decodo & OpenAI\n\nThis powerful workflow automates the process of converting any YouTube video URL into a concise, spoken **Audio Summary (MP3)**. It leverages *"
      }
    },
    {
      "id": "e16ff831-54be-494c-a1fc-00d3096d33da",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -368
      ],
      "parameters": {
        "width": 384,
        "height": 624,
        "content": "## ⚙️ Configuration\nDouble-click the Config node to set your settings:\n* **`output_language`**: (e.g., 'English', 'Spanish', 'German'). The AI and Audio Engine will automatically adapt to this languag"
      }
    },
    {
      "id": "2eaf9450-2fa8-405c-927b-8f702493cf39",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        -368
      ],
      "parameters": {
        "width": 576,
        "height": 624,
        "content": "## 🛡️ Input Validation\n* **Regex Check:** Ensures the user sent a valid YouTube URL.\n* **UX:** Sends a \"Working on it...\" message so the user knows the bot is processing.\n"
      }
    },
    {
      "id": "ccf8ce46-930b-4e29-b721-4eec2e8a6e4d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -368
      ],
      "parameters": {
        "width": 480,
        "height": 624,
        "content": "## 📥 Transcript Extraction\n* **Decodo:** Fetches the raw JSON transcript from the video.\n* **Setup:** Double-click to enter your API Key. (See the **80% OFF** deal nearby to get started!).\n* **Error C"
      }
    },
    {
      "id": "85ded5ea-4765-4be3-aece-5e38498a7b96",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -176
      ],
      "parameters": {
        "width": 384,
        "height": 432,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## 📝 Formatting\nThis Code node flattens the deep JSON structure from Decodo into a clean text string that the AI can read.\n"
      }
    },
    {
      "id": "4b19df1d-3633-4ffb-9be9-19b82ba836af",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        -368
      ],
      "parameters": {
        "width": 528,
        "height": 624,
        "content": "## 🧠 AI Summarization (OpenAI)\n* **Model:** Uses **OpenAI gpt-4o-mini** for its large context window (capable of reading long videos).\n* **Structure:** The System Prompt instructs the AI to act as an "
      }
    },
    {
      "id": "a93bea12-cad8-418f-9510-abb4e9f59be0",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2048,
        -368
      ],
      "parameters": {
        "width": 480,
        "height": 624,
        "content": "## 🎙️ Audio Generation\n* **OpenAI TTS:** Converts the text script into a high-quality MP3 file.\n* **Model:** Uses `tts-1` for fast generation."
      }
    },
    {
      "id": "279fb0ff-17a8-4e93-a16c-d37a8d9eaf89",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2608,
        -368
      ],
      "parameters": {
        "width": 624,
        "height": 624,
        "content": "## ✈️  Delivery\nSends two messages back to the user:\n1.  **Audio:** The generated MP3 file.\n2.  **Text:** A formatted HTML summary with the video title, genre tag, and link.\n\n"
      }
    },
    {
      "id": "cf847ab7-cd6e-4604-9d2c-fbe06c787c6c",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -608
      ],
      "parameters": {
        "width": 480,
        "height": 208,
        "content": "## 🎁 Exclusive 80% Discount!\n\nGet **80% OFF** the **23k Advanced Scraping API** plan at Decodo using this workflow.\n\n**Coupon Code:** `ATTAN8N`\n\n👉 [**Click here to Sign Up & Claim**](https://visit.dec"
      }
    },
    {
      "id": "09b1767c-0c92-48a1-8dcb-cfdc038cea5d",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1568,
        64
      ]
    }
  ],
  "connections": {
    "Config": {
      "main": [
        [
          {
            "node": "Check: Is Valid URL?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Summarizer": {
      "main": [
        [
          {
            "node": "OpenAI TTS (Create Audio)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Summarizer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send Text Summary": {
      "main": [
        []
      ]
    },
    "Send Audio Summary": {
      "main": [
        [
          {
            "node": "Send Text Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check: Is Valid URL?": {
      "main": [
        [
          {
            "node": "Send Working on it Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Format Transcript": {
      "main": [
        [
          {
            "node": "AI Summarizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Summarizer",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Decodo (Fetch Transcript)": {
      "main": [
        [
          {
            "node": "Check for Transcript Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI TTS (Create Audio)": {
      "main": [
        [
          {
            "node": "Send Audio Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Transcript Error": {
      "main": [
        [
          {
            "node": "Send Transcript Failed Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code: Format Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Working on it Message": {
      "main": [
        [
          {
            "node": "Decodo (Fetch Transcript)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}