Back to Templates
This workflow uses YouTube Data API v3 and Google Gemini 1.5 Flash AI to automatically generate timestamped chapters for videos by analyzing SRT captions. It enhances viewer navigation, improves SEO , and saves creators time by automating manual tasks.
Create a Google Cloud Project
Enable YouTube Data API v3
Configure OAuth Consent Screen
Generate OAuth 2.0 Credentials
Add Credentials to n8n
gemini-1.5-flash-8b-exp-0924
model by getting the api key.Set Video ID
r1wqsrW2vmE
) using the Set Video ID
node.Fetch Video Metadata
Download SRT Captions
https://www.googleapis.com/youtube/v3/captions
to fetch the caption track ID .https://www.googleapis.com/youtube/v3/captions/{{ID}}?tfmt=srt
.Analyze Transcript with Gemini AI
"Classify this transcript into timestamped chapters (e.g., 00:00 - Introduction)."
Structured Captions
node) .Update Video Description
videos.update
method .