Fetches each video transcript you list, summarises the whole thing section by section with AI, and logs it to a sheet.

UsesGoogle SheetsOpenAI

Summarise long videos from their transcripts

Give it a list of transcript links, one per line with an optional title, and run it whenever you have a batch of videos to get through. Each transcript is fetched, cut into sections along its own line breaks and read section by section by the AI, which notes the actual claims in each part. Those notes are then written up as one summary in the style you describe, with key points underneath, so the end of a long talk is covered too.

You end up with a 'Video summaries' tab in your Google Sheet holding one row per video: date, title, transcript link, word count, sections covered, summary and key points. The tab is created on the first run and added to after that, never overwritten. A transcript that cannot be fetched or comes back empty is reported and skipped while the rest go through, and a very long one is capped at a set number of sections, with the row saying how many were read.

Transcripts must be reachable by link; the video itself cannot be read.

ValuesSet transcriptLinks to blank.Set transcriptLinks to blank.
ValuesSet reportSheetUrl to blank.Set reportSheetUrl to blank.
ValuesSet summaryStyle to One tight paragraph in plain English for someone who has not seen the video, naming the speaker's actual claims rather than the topics they touched on..Set summaryStyle to One tight paragraph in plain English for someone who has not seen the video, naming the speaker's actual claims rather than the topics they touched on..
ValuesSet reportTabName to Video summaries.Set reportTabName to Video summaries.
ValuesSet charactersPerSection to 8000.Set charactersPerSection to 8000.
ValuesSet maxSectionsPerVideo to 10.Set maxSectionsPerVideo to 10.
ValuesSet summaryModel to gpt-5.4-mini.Set summaryModel to gpt-5.4-mini.
ValuesSet tabIsNew to false.Set tabIsNew to false.
Decisions & LoopsIf a step below fails, save the error as createTabErrorIf a step below fails, save the error as createTabError
Try
Google SheetsGoogle SheetsCreate the tab reportTabName in reportSheetUrl.Create the tab reportTabName in reportSheetUrl.
ValuesChange tabIsNew to true.Change tabIsNew to true.
On error
ValuesShow in the output: The '@reportTabName' tab is already there, so this run adds to it. (createTabError.message).Show in the output: The '@reportTabName' tab is already there, so this run adds to it. (createTabError.message).
Decisions & LoopsIf tabIsNew is yesIf tabIsNew is yes
Yes
Google SheetsGoogle SheetsAdd a row to reportTabName in reportSheetUrl.Add a row to reportTabName in reportSheetUrl.
No
No steps
TextSplit transcriptLinks by a new line and save it as transcriptEntries.Split transcriptLinks by a new line and save it as transcriptEntries.
ValuesSet videosSummarised to 0.Set videosSummarised to 0.
Decisions & LoopsFor each transcriptEntry in transcriptEntries:For each transcriptEntry in transcriptEntries:
TextTrim transcriptEntry and save it as entryText.Trim transcriptEntry and save it as entryText.
Decisions & LoopsIf entryText is emptyIf entryText is empty
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
TextSplit entryText by | and save it as entryParts.Split entryText by | and save it as entryParts.
TextTrim the last item of entryParts and save it as transcriptUrl.Trim the last item of entryParts and save it as transcriptUrl.
TextTrim the first item of entryParts and save it as videoLabel.Trim the first item of entryParts and save it as videoLabel.
Decisions & LoopsIf transcriptUrl is emptyIf transcriptUrl is empty
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf videoLabel is emptyIf videoLabel is empty
Yes
ValuesChange videoLabel to transcriptUrl.Change videoLabel to transcriptUrl.
No
No steps
ValuesSet transcriptText to blank.Set transcriptText to blank.
ValuesSet transcriptReached to false.Set transcriptReached to false.
Decisions & LoopsIf a step below fails, save the error as fetchErrorIf a step below fails, save the error as fetchError
Try
HTTPFetch transcriptUrl and save it as response.Fetch transcriptUrl and save it as response.
ValuesChange transcriptReached to response.ok.Change transcriptReached to response.ok.
TextTrim response.body and save it as transcriptText.Trim response.body and save it as transcriptText.
On error
ValuesShow in the output: Could not open the transcript at transcriptUrl - fetchError.message.Show in the output: Could not open the transcript at transcriptUrl - fetchError.message.
Decisions & LoopsIf transcriptReached isn't yes or transcriptText is emptyIf transcriptReached isn't yes or transcriptText is empty
Yes
ValuesShow in the output: No transcript text came back from transcriptUrl, so nothing was summarised for videoLabel.Show in the output: No transcript text came back from transcriptUrl, so nothing was summarised for videoLabel.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
TextCount the words in transcriptText and save it as transcriptWords.Count the words in transcriptText and save it as transcriptWords.
TextSplit transcriptText by a new line and save it as transcriptLines.Split transcriptText by a new line and save it as transcriptLines.
ListsStart an empty list and save it as sections.Start an empty list and save it as sections.
ValuesSet currentSection to blank.Set currentSection to blank.
Decisions & LoopsFor each transcriptLine in transcriptLines:For each transcriptLine in transcriptLines:
Decisions & LoopsIf the length of currentSection plus the length of transcriptLine plus 1 is…If the length of currentSection plus the length of transcriptLine plus 1 is…
Yes
ListsAdd currentSection to the end of sections and save it as sections.Add currentSection to the end of sections and save it as sections.
ValuesChange currentSection to blank.Change currentSection to blank.
No
No steps
ValuesChange currentSection to currentSection@transcriptLineChange currentSection to currentSection@transcriptLine .
Decisions & LoopsIf currentSection isn't blankIf currentSection isn't blank
Yes
ListsAdd currentSection to the end of sections and save it as sections.Add currentSection to the end of sections and save it as sections.
No
No steps
Decisions & LoopsIf the length of sections is greater than maxSectionsPerVideoIf the length of sections is greater than maxSectionsPerVideo
Yes
ValuesShow in the output: The transcript for videoLabel is the length of sections as text sections long, so only the first maxSectionsPerVideo as text were summarised. Raise 'maxSectionsPerVideo' to cover the whole thing.Show in the output: The transcript for videoLabel is the length of sections as text sections long, so only the first maxSectionsPerVideo as text were summarised. Raise 'maxSectionsPerVideo' to cover the whole thing.
No
No steps
ListsStart an empty list and save it as sectionNotes.Start an empty list and save it as sectionNotes.
ValuesSet sectionsRead to 0.Set sectionsRead to 0.
Decisions & LoopsFor each section in sections:For each section in sections:
Decisions & LoopsIf sectionsRead is greater than or equal to maxSectionsPerVideoIf sectionsRead is greater than or equal to maxSectionsPerVideo
Yes
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
ValuesAdd 1 to sectionsRead.Add 1 to sectionsRead.
TextShorten section to charactersPerSection characters (keeping words whole) and save it as sectionText.Shorten section to charactersPerSection characters (keeping words whole) and save it as sectionText.
Decisions & LoopsIf a step below fails, save the error as sectionErrorIf a step below fails, save the error as sectionError
Try
OpenAIOpenAIAsk OpenAI: 'You are reading one part of a video transcript and writing down what it actually says.Ask OpenAI: 'You are reading one part of a video transcript and writing down what it actually says. Write the points this part makes as short bullets, each on its own line starting with a dash. Keep names, numbers, definitions and conclusions exactly as they are stated, and do not add anything that is not in the text. The transcript may contain timestamps, caption cue numbers and speaker labels - ignore them. If this part is only an introduction, filler or an advertisement, reply with the single word none. Video: videoLabel Part sectionsRead as text of the length of sections as text of the transcript: sectionText'. Save it as sectionReply.
TextTrim sectionReply.response_text and save it as sectionNote.Trim sectionReply.response_text and save it as sectionNote.
Decisions & LoopsIf sectionNote isn't empty and sectionNote is not noneIf sectionNote isn't empty and sectionNote is not none
Yes
ListsAdd sectionNote to the end of sectionNotes and save it as sectionNotes.Add sectionNote to the end of sectionNotes and save it as sectionNotes.
No
No steps
On error
ValuesShow in the output: Could not read part sectionsRead as text of videoLabel - sectionError.message.Show in the output: Could not read part sectionsRead as text of videoLabel - sectionError.message.
Decisions & LoopsIf sectionNotes is emptyIf sectionNotes is empty
Yes
ValuesShow in the output: Nothing usable came back for videoLabel, so no row was written for it.Show in the output: Nothing usable came back for videoLabel, so no row was written for it.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
TextJoin sectionNotes with a blank line and save it as combinedNotes.Join sectionNotes with a blank line and save it as combinedNotes.
ValuesSet sectionsUsed to the length of sectionNotes as text of the length of sections as text.Set sectionsUsed to the length of sectionNotes as text of the length of sections as text.
ValuesSet summaryText to blank.Set summaryText to blank.
ValuesSet keyPoints to blank.Set keyPoints to blank.
Decisions & LoopsIf a step below fails, save the error as summaryErrorIf a step below fails, save the error as summaryError
Try
OpenAIOpenAIAsk OpenAI: 'You are writing the summary of one video from notes taken in order across its whole transcript.Ask OpenAI: 'You are writing the summary of one video from notes taken in order across its whole transcript. Write the summary in this style: summaryStyle Then write a line containing exactly KEY POINTS: and, under it, the points a reader should take away, one per line starting with a dash. Add no other headings, and never mention the notes or the transcript. Video: videoLabel Notes taken across the transcript, in order: combinedNotes'. Save it as finalReply.
TextTrim finalReply.response_text and save it as answer.Trim finalReply.response_text and save it as answer.
TextSplit answer by KEY POINTS: and save it as answerParts.Split answer by KEY POINTS: and save it as answerParts.
TextTrim the first item of answerParts and save it as summaryText.Trim the first item of answerParts and save it as summaryText.
Decisions & LoopsIf the length of answerParts is greater than 1If the length of answerParts is greater than 1
Yes
TextTrim the last item of answerParts and save it as keyPoints.Trim the last item of answerParts and save it as keyPoints.
No
No steps
On error
ValuesShow in the output: Could not summarise videoLabel - summaryError.message.Show in the output: Could not summarise videoLabel - summaryError.message.
Decisions & LoopsIf summaryText is emptyIf summaryText is empty
Yes
ValuesShow in the output: No summary came back for videoLabel, so no row was written for it.Show in the output: No summary came back for videoLabel, so no row was written for it.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf a step below fails, save the error as writeErrorIf a step below fails, save the error as writeError
Try
Google SheetsGoogle SheetsAdd a row to reportTabName in reportSheetUrl.Add a row to reportTabName in reportSheetUrl.
ValuesAdd 1 to videosSummarised.Add 1 to videosSummarised.
On error
ValuesShow in the output: Could not add the summary for videoLabel to the sheet - writeError.message.Show in the output: Could not add the summary for videoLabel to the sheet - writeError.message.
ValuesShow in the output: Summarised videosSummarised as text video(s) into the '@reportTabName' tab.Show in the output: Summarised videosSummarised as text video(s) into the '@reportTabName' tab.