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
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 emptyYes
No
No steps
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.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 topicErrorTry
topicPrompt. 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.On error
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 emptyYes
No
No steps
topic in lowercase is noneIf topic in lowercase is noneYes
No
No steps
referenceLink to blank.Set referenceLink to blank.referenceText to blank.Set referenceText to blank.lookupErrorIf a step below fails, save the error as lookupErrorTry
topic. 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.On error
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 emptyYes
entry to topicSet entry to topic
referenceText.referenceLink isn't emptyIf referenceLink isn't emptyYes
entry to entryChange entry to entry
More: referenceLink.No
No steps
entry to the end of background and save it as background.Add entry to the end of background and save it as background.No
No steps
digest to episodeTitleSet digest to episodeTitle
WHAT THE EPISODE COVERED
summary.background isn't emptyIf background isn't emptyYes
digest to digestChange digest to digest
BACKGROUND ON WHAT IT MENTIONED
background joined by a blank line.No
No steps
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.