Sorts the comments on your latest videos into asks, praise and complaints, and emails the counts with real quotes.
Uses
Claude
Gmail
Google Sheets
YouTube
What your YouTube viewers are saying
Every Monday at 09:00, the comments on your channel's most recent uploads are read and each one is sorted by what the viewer wanted: a request for something, praise, a complaint or ordinary chatter. You get one email with the counts under each heading and a handful of real comments quoted beneath them, each with the viewer's name and the video it was left on.
The quotes are lifted straight out of the comments. The AI only ever decides which pile a comment belongs in and never writes the quotes, so no wording in the digest is invented. Only top level comments are read, in the order YouTube considers most relevant, and the replies beneath them are not fetched. A comment that cannot be read or sorted is logged and skipped while the rest carry on, and if no comments came back at all no digest is sent. If you give it a spreadsheet, each run also appends one row of the date, channel and counts, so you can watch the balance move week to week; without one, no sheet is touched.
channelId to blank.Set channelId to blank.digestRecipient to blank.Set digestRecipient to blank.videosToCheck to 3.Set videosToCheck to 3.commentsPerVideo to 15.Set commentsPerVideo to 15.quotesPerTheme to 4.Set quotesPerTheme to 4.logSheetUrl to blank.Set logSheetUrl to blank.logSheetTab to Comment themes.Set logSheetTab to Comment themes.channelId. Save it as channel.Get the details of channelId. Save it as channel.channelName to your channel.Set channelName to your channel.channelNameErrorIf a step below fails, save the error as channelNameErrorchannel.title and save it as channelName.Trim channel.title and save it as channelName.The channel has no title; calling it 'your channel'..Show in the output: The channel has no title; calling it 'your channel'..uploadsPlaylistId to blank.Set uploadsPlaylistId to blank.uploadsErrorIf a step below fails, save the error as uploadsErrorchannel.related_playlists.uploads and save it as uploadsPlaylistId.Trim channel.related_playlists.uploads and save it as uploadsPlaylistId.That channel did not come back with an uploads playlist..Show in the output: That channel did not come back with an uploads playlist..uploadsPlaylistId is emptyIf uploadsPlaylistId is emptyuploadsPlaylistId. Save it as uploads.List the videos in uploadsPlaylistId. Save it as uploads.videos to uploads.items.Set videos to uploads.items.reviewedCount to 0.Set reviewedCount to 0.requestCount to 0.Set requestCount to 0.praiseCount to 0.Set praiseCount to 0.complaintCount to 0.Set complaintCount to 0.otherCount to 0.Set otherCount to 0.requestQuotes to an empty list.Set requestQuotes to an empty list.praiseQuotes to an empty list.Set praiseQuotes to an empty list.complaintQuotes to an empty list.Set complaintQuotes to an empty list.videoLines to an empty list.Set videoLines to an empty list.video in videos:For each video in videos:videoTitle to Untitled video.Set videoTitle to Untitled video.videoTitleErrorIf a step below fails, save the error as videoTitleErrorvideo.title and save it as videoTitle.Trim video.title and save it as videoTitle.A video in the uploads list had no title..Show in the output: A video in the uploads list had no title..videoId to blank.Set videoId to blank.videoIdErrorIf a step below fails, save the error as videoIdErrorvideo.video_id and save it as videoId.Trim video.video_id and save it as videoId.Skipped an uploads entry that had no video id..Show in the output: Skipped an uploads entry that had no video id..videoId isn't emptyIf videoId isn't emptyvideoCommentCount to 0.Set videoCommentCount to 0.comments to an empty list.Set comments to an empty list.commentReadErrorIf a step below fails, save the error as commentReadErrorcomments to the items from the YouTube “List video comments” step.Change comments to the items from the YouTube “List video comments” step.videoTitle.Show in the output: Could not read the comments on: videoTitle.comment in comments:For each comment in comments:commentText to blank. Set commentText to blank.commentTextError If a step below fails, save the error as commentTextErrorcomment.text and save it as commentText.Trim comment.text and save it as commentText.videoTitle.Show in the output: Skipped a comment with no text on: videoTitle.commentText isn't empty If commentText isn't emptycommentAuthor to A viewer.Set commentAuthor to A viewer.commentAuthorErrorIf a step below fails, save the error as commentAuthorErrorcomment.author and save it as commentAuthor.Trim comment.author and save it as commentAuthor.A comment had no author name; recording it as 'A viewer'..Show in the output: A comment had no author name; recording it as 'A viewer'..commentAuthor is emptyIf commentAuthor is emptycommentAuthor to A viewer.Change commentAuthor to A viewer.sortPrompt to You are sorting one comment left on a YouTube video into exactly one bucket.Set sortPrompt to You are sorting one comment left on a YouTube video into exactly one bucket.
Reply with EXACTLY one of these words and nothing else - no punctuation, no explanation, and never quote the comment back:
request - the viewer is asking for something: a topic, a follow-up, a tutorial, a feature, more detail
praise - the viewer is saying something positive about the video or the channel
complaint - the viewer is unhappy, confused, or reporting a problem
other - anything else, including spam, off-topic chatter and one-word reactions
Video: videoTitle
Comment: commentText.bucket to blank.Set bucket to blank.sortErrorIf a step below fails, save the error as sortError. with in the response text from the Claude “Ask Claude” step in lowercase and save it as bucket.Replace . with in the response text from the Claude “Ask Claude” step in lowercase and save it as bucket.videoTitle.Show in the output: Could not sort a comment on: videoTitle.bucket isn't emptyIf bucket isn't emptyreviewedCount.Add 1 to reviewedCount.videoCommentCount.Add 1 to videoCommentCount.quoteLine to - @commentText truncated to 220 characters using ... as the ellipsis - commentAuthor (on videoTitle).Set quoteLine to - @commentText truncated to 220 characters using ... as the ellipsis - commentAuthor (on videoTitle).bucket is requestIf bucket is requestrequestCount.Add 1 to requestCount.requestQuotes is less than quotesPerThemeIf the length of requestQuotes is less than quotesPerThemequoteLine to the end of requestQuotes and save it as requestQuotes.Add quoteLine to the end of requestQuotes and save it as requestQuotes.praiseCount.Add 1 to praiseCount.praiseQuotes is less than quotesPerThemeIf the length of praiseQuotes is less than quotesPerThemequoteLine to the end of praiseQuotes and save it as praiseQuotes.Add quoteLine to the end of praiseQuotes and save it as praiseQuotes.complaintCount.Add 1 to complaintCount.complaintQuotes is less than quotesPerThemeIf the length of complaintQuotes is less than quotesPerThemequoteLine to the end of complaintQuotes and save it as complaintQuotes.Add quoteLine to the end of complaintQuotes and save it as complaintQuotes.otherCount.Add 1 to otherCount.videoTitle - videoCommentCount as text sorted to the end of videoLines and save it as videoLines.Add - videoTitle - videoCommentCount as text sorted to the end of videoLines and save it as videoLines.reviewedCount is 0If reviewedCount is 0requestBlock to No requests this time..Set requestBlock to No requests this time..requestQuotes isn't emptyIf requestQuotes isn't emptyrequestQuotes with a new line and save it as requestBlock.Join requestQuotes with a new line and save it as requestBlock.requestSection to WHAT THEY ASKED FOR (requestCount as text)Set requestSection to WHAT THEY ASKED FOR (requestCount as text)
requestBlock.praiseBlock to No praise this time..Set praiseBlock to No praise this time..praiseQuotes isn't emptyIf praiseQuotes isn't emptypraiseQuotes with a new line and save it as praiseBlock.Join praiseQuotes with a new line and save it as praiseBlock.praiseSection to WHAT THEY PRAISED (praiseCount as text)Set praiseSection to WHAT THEY PRAISED (praiseCount as text)
praiseBlock.complaintBlock to No complaints this time..Set complaintBlock to No complaints this time..complaintQuotes isn't emptyIf complaintQuotes isn't emptycomplaintQuotes with a new line and save it as complaintBlock.Join complaintQuotes with a new line and save it as complaintBlock.complaintSection to WHAT THEY COMPLAINED ABOUT (complaintCount as text)Set complaintSection to WHAT THEY COMPLAINED ABOUT (complaintCount as text)
complaintBlock.headerLine to Here is what viewers said on the last the length of videoLines as text videos from channelName.Set headerLine to Here is what viewers said on the last the length of videoLines as text videos from channelName.countsBlock to Comments sorted: reviewedCount as textSet countsBlock to Comments sorted: reviewedCount as text
Asked for something: requestCount as text
Praised: praiseCount as text
Complained: complaintCount as text
Everything else: otherCount as text.digestBody to headerLineSet digestBody to headerLine
countsBlock
requestSection
praiseSection
complaintSection
VIDEOS CHECKED
videoLines joined by a new line
Every quote above is copied word for word from a comment on your channel; nothing here is wording the AI came up with.digestRecipient.Send an email to digestRecipient.
Subject: What your viewers said on channelNamedigestBodylogSheetUrl isn't emptyIf logSheetUrl isn't emptylogErrorIf a step below fails, save the error as logErrorlogSheetTab in logSheetUrl.Add a row to logSheetTab in logSheetUrl.The digest was emailed but the run could not be logged to your spreadsheet..Show in the output: The digest was emailed but the run could not be logged to your spreadsheet..