{
  "id": "SCUbdpVPX4USbQmr",
  "meta": {
    "instanceId": "workflow-d05ba977",
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:44.713509",
    "updatedAt": "2025-09-29T07:07:44.713525",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "name": "youtube chapter generator",
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
    "optimized"
  ],
  "nodes": [
    {
      "id": "104fa4ce-cd86-4fff-b31c-0ef37fba6d93",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -800,
        -120
      ],
      "parameters": {},
      "typeVersion": 1,
      "notes": "This manualTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "c3b45480-3098-40f9-a77f-ada54481b590",
      "name": "Get Caption ID",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -200,
        -120
      ],
      "parameters": {
        "url": "{{ $env.BASE_URL }}",
        "options": {},
        "authentication": "{{ $credentials.predefinedCredentialType }}",
        "nodeCredentialType": "YOUR_CREDENTIAL_HERE"
      },
      "credentials": {
        "youTubeOAuth2Api": {
          "id": "1TkjUqPfFCQ6NzL7",
          "name": "YouTube account"
        }
      },
      "typeVersion": 4.2,
      "notes": "This httpRequest node performs automated tasks as part of the workflow."
    },
    {
      "id": "fe08adc4-e6ef-47ae-a946-1e6d5a85e10e",
      "name": "Get Captions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        20,
        -120
      ],
      "parameters": {
        "url": "{{ $env.BASE_URL }}",
        "options": {},
        "authentication": "{{ $credentials.predefinedCredentialType }}",
        "nodeCredentialType": "YOUR_CREDENTIAL_HERE"
      },
      "credentials": {
        "youTubeOAuth2Api": {
          "id": "1TkjUqPfFCQ6NzL7",
          "name": "YouTube account"
        }
      },
      "typeVersion": 4.2,
      "notes": "This httpRequest node performs automated tasks as part of the workflow."
    },
    {
      "id": "0e15f334-9ff8-4a7e-85a9-4cf8cf10ea55",
      "name": "Extract Captions",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        240,
        -120
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1,
      "notes": "This extractFromFile node performs automated tasks as part of the workflow."
    },
    {
      "id": "af99a919-7ebc-4a6c-80be-83e2ffa68d05",
      "name": "Structured Captions",
      "type": "n8n-nodes-base.noOp",
      "position": [
        640,
        100
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"description\": \"California\"\n\t\n}"
      },
      "typeVersion": 1.2,
      "notes": "This outputParserStructured node performs automated tasks as part of the workflow."
    },
    {
      "id": "414a41a2-0715-4a57-a606-9f3678b2472a",
      "name": "Get Video Meta Data",
      "type": "n8n-nodes-base.youTube",
      "position": [
        -420,
        -120
      ],
      "parameters": {
        "options": {},
        "videoId": "={{ $json.video_id }}",
        "resource": "video",
        "operation": "get"
      },
      "credentials": {
        "youTubeOAuth2Api": {
          "id": "1TkjUqPfFCQ6NzL7",
          "name": "YouTube account"
        }
      },
      "typeVersion": 1,
      "notes": "This youTube node performs automated tasks as part of the workflow."
    },
    {
      "id": "7304d9b1-5956-41c3-b78a-2c409d0aa726",
      "name": "Google Gemini Chat Model",
      "type": "n8n-nodes-base.noOp",
      "position": [
        460,
        100
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-1.5-flash-8b-exp-0924"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "FshILEOmCAPVoGfW",
          "name": "Google Gemini(PaLM) Api account 2"
        }
      },
      "typeVersion": 1,
      "notes": "This lmChatGoogleGemini node performs automated tasks as part of the workflow."
    },
    {
      "id": "867a6ad6-0712-4fbf-97fd-ab054b783172",
      "name": "Set Video ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        -120
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "568762f7-e496-4550-8567-d49e2ce1676d",
              "name": "video_id",
              "type": "string",
              "value": "r1wqsrW2vmE"
            }
          ]
        }
      },
      "typeVersion": 3.4,
      "notes": "This set node performs automated tasks as part of the workflow."
    },
    {
      "id": "dcd0c9d7-1a69-45e8-98e9-b7cf7d12734e",
      "name": "Update Chapters",
      "type": "n8n-nodes-base.youTube",
      "position": [
        940,
        -120
      ],
      "parameters": {
        "title": "={{ $('Get Video Meta Data').item.json.snippet.title }}",
        "videoId": "={{ $('Get Captions').item.json.items[0].snippet.videoId }}",
        "resource": "video",
        "operation": "update",
        "categoryId": "22",
        "regionCode": "US",
        "updateFields": {
          "description": "={{ $json.output.description }}\nChapters\n{{ $json.output.description }}"
        }
      },
      "credentials": {
        "youTubeOAuth2Api": {
          "id": "1TkjUqPfFCQ6NzL7",
          "name": "YouTube account"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true,
      "notes": "This youTube node performs automated tasks as part of the workflow."
    },
    {
      "id": "916629c4-6e49-4432-88e8-626748cb3d24",
      "name": "Tag Chapters in Description",
      "type": "n8n-nodes-base.noOp",
      "position": [
        460,
        -120
      ],
      "parameters": {
        "text": "=This is an srt format data. please classify this data into chapters\nbased upon this transcript \n{{ $json.data }}\n{\n\"description\":\"00:00 Introduction\n02:15 Topic One\n05:30 Topic Two\n10:45 Conclusion\"\n}\n",
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.6,
      "notes": "This chainLlm node performs automated tasks as part of the workflow."
    },
    {
      "id": "b0f56d68-b787-4ccc-8bb5-bdb5b04c3ae4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -680,
        -200
      ],
      "parameters": {
        "width": 1040,
        "height": 440,
        "content": "\n## Get Captions"
      },
      "typeVersion": 1,
      "notes": "This stickyNote node performs automated tasks as part of the workflow."
    },
    {
      "id": "0bcee6b5-0e8b-4f85-8f83-c829e785467a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        378,
        -200
      ],
      "parameters": {
        "color": 4,
        "width": 420,
        "height": 440,
        "content": "## Generate Chapters\n"
      },
      "typeVersion": 1,
      "notes": "This stickyNote node performs automated tasks as part of the workflow."
    },
    {
      "id": "0f90f6ec-2154-4945-b262-6531fef2334f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -200
      ],
      "parameters": {
        "color": 6,
        "width": 440,
        "height": 440,
        "content": "## Update Description\n"
      },
      "typeVersion": 1,
      "notes": "This stickyNote node performs automated tasks as part of the workflow."
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "versionId": "27125160-7c64-4431-b243-832c1ae29d29",
  "connections": {
    "c3b45480-3098-40f9-a77f-ada54481b590": {
      "main": [
        [
          {
            "node": "error-handler-c3b45480-3098-40f9-a77f-ada54481b590",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-c3b45480-3098-40f9-a77f-ada54481b590-0bd5fbf3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-c3b45480-3098-40f9-a77f-ada54481b590-59b0ddb3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-c3b45480-3098-40f9-a77f-ada54481b590-57dad9ee",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-c3b45480-3098-40f9-a77f-ada54481b590-2b145ea6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-c3b45480-3098-40f9-a77f-ada54481b590-df2cbce8",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-c3b45480-3098-40f9-a77f-ada54481b590-649896c2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-c3b45480-3098-40f9-a77f-ada54481b590-6af6932c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-c3b45480-3098-40f9-a77f-ada54481b590-e2be8d89",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fe08adc4-e6ef-47ae-a946-1e6d5a85e10e": {
      "main": [
        [
          {
            "node": "error-handler-fe08adc4-e6ef-47ae-a946-1e6d5a85e10e",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-fe08adc4-e6ef-47ae-a946-1e6d5a85e10e-7b80a961",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-fe08adc4-e6ef-47ae-a946-1e6d5a85e10e-8ba52bb4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-fe08adc4-e6ef-47ae-a946-1e6d5a85e10e-fe6170b5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-fe08adc4-e6ef-47ae-a946-1e6d5a85e10e-38d8ae8c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-fe08adc4-e6ef-47ae-a946-1e6d5a85e10e-bf1637ab",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-fe08adc4-e6ef-47ae-a946-1e6d5a85e10e-6bb078d7",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-fe08adc4-e6ef-47ae-a946-1e6d5a85e10e-1d440931",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "error-handler-fe08adc4-e6ef-47ae-a946-1e6d5a85e10e-65c9e237",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0e15f334-9ff8-4a7e-85a9-4cf8cf10ea55": {
      "main": [
        [
          {
            "node": "error-handler-0e15f334-9ff8-4a7e-85a9-4cf8cf10ea55-f09c7358",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7304d9b1-5956-41c3-b78a-2c409d0aa726": {
      "main": [
        [
          {
            "node": "error-handler-7304d9b1-5956-41c3-b78a-2c409d0aa726-a1c922a1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "description": "Automated workflow: youtube chapter generator. This workflow integrates 10 different services: stickyNote, youTube, httpRequest, lmChatGoogleGemini, chainLlm. It contains 19 nodes and follows best practices for error handling and security.",
  "notes": "Excellent quality workflow: youtube chapter generator. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."
}