Summarises an episode's transcript or show notes, adds background on who and what it mentions, and emails you the digest.
Uses
Gmail
OpenAIWikipedia
Turn a podcast episode into an emailed digest
Paste in an episode's transcript or show notes, name the episode, and run it. The AI writes a summary of what the episode actually argued and the examples it rested on, works out which people, organisations, places and topics it mentioned, and looks each of those up in Wikipedia. The summary and the background are emailed to you as one digest.
You get an email under the episode title, the summary in short plain paragraphs, and beneath it a background section quoting Wikipedia's own opening paragraph for each name with a link, so nothing there is invented. A name with no entry is quietly left out rather than shown as a gap, and if the lookups fail altogether the digest still goes out with the summary alone. Long transcripts are trimmed before they reach the AI, and the number of names looked up per run is capped.
It needs the words of the episode, not the audio: nothing here transcribes a recording, so copy the transcript or show notes from wherever the podcast publishes them.
episodeTitle to blank.Set episodeTitle to blank.episodeNotes to blank.Set episodeNotes to blank.recipientEmail to blank.Set recipientEmail to blank.maxTranscriptCharacters to 16000.Set maxTranscriptCharacters to 16000.maxBackgroundLookups to 8.Set maxBackgroundLookups to 8.episodeNotes to maxTranscriptCharacters characters and save it as episodeText.Shorten episodeNotes to maxTranscriptCharacters characters and save it as episodeText.summaryPrompt to You are writing the summary section of a digest about one podcast episode, for someone who has not listened to it.Set summaryPrompt to You are writing the summary section of a digest about one podcast episode, for someone who has not listened to it.
Cover what the episode actually argued, the evidence or examples it rested on, and anything a listener would want to act on afterwards. Use short paragraphs and plain sentences, and no more than 250 words. Use only what the text below says - do not add background, figures or conclusions that are not in it. Reply with the summary and nothing else.
Episode: episodeTitle
Transcript or show notes:
episodeText.summaryPrompt. Save it as summaryReply.Ask OpenAI: summaryPrompt. Save it as summaryReply.summaryReply.response_text and save it as summary.Trim summaryReply.response_text and save it as summary.summary is emptyIf summary is emptytopicPrompt to List the people, organisations, places and named topics that the podcast episode below refers to and that a reader might not already know.Set topicPrompt to List the people, organisations, places and named topics that the podcast episode below refers to and that a reader might not already know.
Give the exact name each one is best known by, because every name is looked up in an encyclopaedia exactly as written. One name per line, with no bullets, no numbering, no explanation and nothing else. Leave out the host, the show itself, and anything too general to have an encyclopaedia entry. If there is nothing worth looking up, reply with the single word none.
Episode: episodeTitle
Transcript or show notes:
episodeText.topicText to blank.Set topicText to blank.topicErrorIf a step below fails, save the error as topicErrortopicPrompt. Save it as topicReply.Ask OpenAI: topicPrompt. Save it as topicReply.topicReply.response_text and save it as topicText.Trim topicReply.response_text and save it as topicText.topicError as text.Show in the output: Could not work out what the episode mentioned, so the digest goes out without background: topicError as text.maxBackgroundLookups items of topicText split by a new line and save it as topics.Take the first maxBackgroundLookups items of topicText split by a new line and save it as topics.background to an empty list.Set background to an empty list.line in topics:For each line in topics:line and save it as topic.Trim line and save it as topic.topic is emptyIf topic is emptytopic in lowercase is noneIf topic in lowercase is nonereferenceLink to blank.Set referenceLink to blank.referenceText to blank.Set referenceText to blank.lookupErrorIf a step below fails, save the error as lookupErrortopic. Save it as reference.Get the summary of topic. Save it as reference.reference.url and save it as referenceLink.Trim reference.url and save it as referenceLink.reference.extract and save it as referenceText.Trim reference.extract and save it as referenceText.topic, leaving it out of the digest: lookupError as text.Show in the output: No reference entry for topic, leaving it out of the digest: lookupError as text.referenceText isn't emptyIf referenceText isn't emptyentry to topicSet entry to topic
referenceText.referenceLink isn't emptyIf referenceLink isn't emptyentry to entryChange entry to entry
More: referenceLink.entry to the end of background and save it as background.Add entry to the end of background and save it as background.digest to episodeTitleSet digest to episodeTitle
WHAT THE EPISODE COVERED
summary.background isn't emptyIf background isn't emptydigest to digestChange digest to digest
BACKGROUND ON WHAT IT MENTIONED
background joined by a blank line.digest to digestChange digest to digest
---
Summarised from the transcript or show notes you supplied. Background comes from Wikipedia.recipientEmail.Send an email to recipientEmail.
Subject: Podcast digest: episodeTitledigestepisodeTitle sent to recipientEmail.Show in the output: Digest for episodeTitle sent to recipientEmail.