n8n

How to Automate YouTube Chapter Updates?

Create clean video chapters from your YouTube captions and update the video description in minutes. Ideal for creators and marketing teams who want better watch time and easier navigation without manual work.

Here is how it runs. You start it by clicking run. A Set step holds the video ID. The workflow pulls video data, then calls the YouTube API to find the caption track and download it in SRT format. The text is extracted from the SRT file. Google Gemini reads the transcript and returns a clear list of timestamps and chapter titles. An output parser turns the AI result into structured JSON. The YouTube update step writes a new description that includes the chapter list so YouTube can detect chapters automatically. The title and region settings are mapped from the video data for a clean update.

You need a YouTube account with permission to edit the video and a Google Gemini API key. Expect to cut chapter editing time from about an hour to a few minutes per video. This works well for tutorials, webinars, product demos, and long interviews where chapters help viewers jump to key parts. After connecting credentials, run a test with one video ID, check the output, and then reuse it for more videos.

What are the key features?

  • Manual run to test and control when updates happen
  • Video ID set in one place for quick targeting
  • YouTube caption lookup and SRT download through the YouTube Data API
  • Text extraction from SRT to get a clean transcript for analysis
  • Google Gemini generates chapter timestamps and titles from the transcript
  • Structured parser returns a JSON description field ready for update
  • Video metadata fetch maps the title and keeps regional settings
  • Automatic description update so YouTube can detect chapters

What are the benefits?

  • Reduce manual chapter writing from 60 minutes to about 5 minutes per video
  • Automate up to 80 percent of repetitive editing work for long videos
  • Improve timestamp accuracy and consistency across uploads
  • Connect YouTube and Google Gemini in one flow for faster updates
  • Scale to many videos by swapping the input video ID

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with YouTube and Google Gemini. See the Tools Required section above for links to create accounts with these services.
  3. Open the Set Video ID node and replace the sample video_id value with the ID of a video you can edit in your YouTube channel.
  4. Connect your YouTube account: double click the Get Caption ID node, choose Credential to connect with, click Create new credential, and follow the on screen steps to sign in. Repeat for the Get Captions, Get Video Meta Data, and Update Chapters nodes.
  5. Connect Google Gemini: double click the Google Gemini Chat Model node, click Create new credential, then paste an API key from the official API page of the provider. Save the credential.
  6. Open the Get Video Meta Data node and confirm the videoId field reads {{ $json.video_id }} and the operation is set to get.
  7. Test caption access: run the Get Caption ID node. If it returns no items, make sure the video has captions published and your account has permission to view and update them.
  8. Run the full workflow with the manual trigger. After it finishes, review the output of the Tag Chapters in Description node to confirm timestamps and titles look correct.
  9. Check the Update Chapters node settings. Confirm the title comes from the Get Video Meta Data node and that the description update includes your chapter list.
  10. Validate in YouTube Studio by opening the video and confirming the description updated and chapters appear on the timeline. If chapters do not show, verify timestamps use 00:00 format and appear near the top of the description.
  11. Troubleshoot common issues: if updates fail, check YouTube API quota and channel permissions. If the AI output is too long or short, adjust the prompt text in the Tag Chapters in Description node and test again.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

YouTube

Sign up

Free: $0, default quota 10,000 units/day

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.