Searches the last day's news for your brand and people, archives what it finds and posts a round-up to Slack.
Uses
Claude
Google Sheets
Serper
Slack
Get a daily round-up of your press coverage in Slack
searchTerms to blank.Set searchTerms to blank.slackChannelId to blank.Set slackChannelId to blank.archiveUrl to blank.Set archiveUrl to blank.archiveTab to Coverage.Set archiveTab to Coverage.resultsPerTerm to 10.Set resultsPerTerm to 10.searchTerms by a new line and save it as terms.Split searchTerms by a new line and save it as terms.found to an empty list.Set found to an empty list.term in terms:For each term in terms:searchErrorIf a step below fails, save the error as searchErrorTry
term and save it as cleanTerm.Trim term and save it as cleanTerm.cleanTerm isn't emptyIf cleanTerm isn't emptyYes
cleanTerm. Save it as results.Search Google News for cleanTerm. Save it as results.article in results.articles:For each article in results.articles:articleError If a step below fails, save the error as articleErrorTry
article.title and save it as headline.Trim article.title and save it as headline.article.link and save it as url.Trim article.link and save it as url.headline isn't empty and url isn't emptyIf headline isn't empty and url isn't emptyYes
line to - headline (article.source) url.Set line to - headline (article.source) url.line to the end of found and save it as found.Add line to the end of found and save it as found.archiveTab in archiveUrl.Add a row to archiveTab in archiveUrl.No
No steps
On error
cleanTerm: articleError as text.Show in the output: Skipped an article for cleanTerm: articleError as text.No
No steps
On error
searchError as text.Show in the output: Could not search for a term: searchError as text.found is emptyIf found is emptyYes
slackChannelId.Send a message to slackChannelId.*Coverage round-up*
Nothing new in the last day.No
found with a new line and save it as coverage.Join found with a new line and save it as coverage.summaryErrorIf a step below fails, save the error as summaryErrorTry
coverage'. Save it as written.
Maximum response length: 400written.response_text and save it as summary.Trim written.response_text and save it as summary.slackChannelId.Send a message to slackChannelId.*Coverage round-up* (the length of found as text)
summary
coverageOn error
slackChannelId.Send a message to slackChannelId.*Coverage round-up* (the length of found as text)
_Summary unavailable today._
coverage