Every morning, merges headlines on your topic from two news services, drops the duplicates and sends one digest to Telegram.

UsesGNewsGoogle TranslateNews APITelegram

Morning news digest in Telegram

Every morning at 07:00, the last twenty-four hours of news on your topic is read from two independent services, GNews and News API, and merged into one Telegram message. Two services are used because they index different publishers, so between them they cover far more than either does alone.

You get one digest with each story once: headlines are matched on their text, ignoring case and spacing, and the second copy of a story is dropped. Each line carries the headline, the publisher and the link exactly as the service supplied them, with nothing summarised, rewritten or invented. If one service is down you still get the other's headlines, with a line saying which was missing, and the digest is sent on quiet mornings too, saying so. Headlines can be translated into a language you choose, and one that cannot be translated is sent in its original language rather than dropped.

You need a Telegram chat to send to and a topic to follow, plus connections to both news services.

ScheduleRun every day at 07:00.Run every day at 07:00.
ValuesSet newsTopic to blank.Set newsTopic to blank.
ValuesSet digestChatId to blank.Set digestChatId to blank.
ValuesSet translateInto to blank.Set translateInto to blank.
ValuesSet headlineLanguage to en.Set headlineLanguage to en.
ValuesSet headlinesPerSource to 8.Set headlinesPerSource to 8.
ValuesSet maxHeadlines to 10.Set maxHeadlines to 10.
ListsStart an empty list and save it as sourceNotes.Start an empty list and save it as sourceNotes.
ListsStart an empty list and save it as gnewsArticles.Start an empty list and save it as gnewsArticles.
Decisions & LoopsIf a step below fails, save the error as sourceErrorIf a step below fails, save the error as sourceError
Try
GNewsGNewsSearch for recent newsTopic coverage. Save it as response.Search for recent newsTopic coverage. Save it as response.
ListsCombine a list of [] and response.articles into one list and save it as gnewsArticles.Combine a list of [] and response.articles into one list and save it as gnewsArticles.
On error
ListsAdd GNews could not be read this morning. to the end of sourceNotes and save it as sourceNotes.Add GNews could not be read this morning. to the end of sourceNotes and save it as sourceNotes.
ValuesShow in the output: GNews search failed: sourceError as text.Show in the output: GNews search failed: sourceError as text.
ListsStart an empty list and save it as newsApiArticles.Start an empty list and save it as newsApiArticles.
Decisions & LoopsIf a step below fails, save the error as sourceErrorIf a step below fails, save the error as sourceError
Try
News APINews APISearch for recent newsTopic coverage. Save it as response.Search for recent newsTopic coverage. Save it as response.
ListsCombine a list of [] and response.articles into one list and save it as newsApiArticles.Combine a list of [] and response.articles into one list and save it as newsApiArticles.
On error
ListsAdd News API could not be read this morning. to the end of sourceNotes and save it as sourceNotes.Add News API could not be read this morning. to the end of sourceNotes and save it as sourceNotes.
ValuesShow in the output: News API search failed: sourceError as text.Show in the output: News API search failed: sourceError as text.
ListsCombine gnewsArticles and newsApiArticles into one list and save it as allArticles.Combine gnewsArticles and newsApiArticles into one list and save it as allArticles.
ListsStart an empty list and save it as seenHeadlines.Start an empty list and save it as seenHeadlines.
ListsStart an empty list and save it as digestLines.Start an empty list and save it as digestLines.
Decisions & LoopsFor each article in allArticles:For each article in allArticles:
Decisions & LoopsIf the length of digestLines is greater than or equal to maxHeadlines multiplied…If the length of digestLines is greater than or equal to maxHeadlines multiplied…
Yes
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
Decisions & LoopsIf a step below fails, save the error as articleErrorIf a step below fails, save the error as articleError
Try
TextTrim article.title and save it as headline.Trim article.title and save it as headline.
TextMake headline lowercase and save it as headlineKey.Make headline lowercase and save it as headlineKey.
Decisions & LoopsIf headline isn't empty and seenHeadlines doesn't contain headlineKeyIf headline isn't empty and seenHeadlines doesn't contain headlineKey
Yes
ListsAdd headlineKey to the end of seenHeadlines and save it as seenHeadlines.Add headlineKey to the end of seenHeadlines and save it as seenHeadlines.
ValuesSet shownHeadline to headline.Set shownHeadline to headline.
Decisions & LoopsIf translateInto isn't emptyIf translateInto isn't empty
Yes
Decisions & LoopsIf a step below fails, save the error as translateErrorIf a step below fails, save the error as translateError
Try
Google TranslateGoogle TranslateTranslate headline into translateInto. Save it as translation.Translate headline into translateInto. Save it as translation.
TextTrim translation.translated_text and save it as translatedText.Trim translation.translated_text and save it as translatedText.
Decisions & LoopsIf translatedText isn't emptyIf translatedText isn't empty
Yes
ValuesChange shownHeadline to translatedText.Change shownHeadline to translatedText.
TextReplace ' with ' in shownHeadline and save it as shownHeadline.Replace ' with ' in shownHeadline and save it as shownHeadline.
TextReplace " with " in shownHeadline and save it as shownHeadline.Replace " with " in shownHeadline and save it as shownHeadline.
TextReplace & with & in shownHeadline and save it as shownHeadline.Replace & with & in shownHeadline and save it as shownHeadline.
No
No steps
On error
ValuesShow in the output: Could not translate a headline, keeping the original: translateError as text.Show in the output: Could not translate a headline, keeping the original: translateError as text.
No
No steps
ValuesSet publisherPart to blank.Set publisherPart to blank.
Decisions & LoopsIf a step below fails, save the error as missingFieldIf a step below fails, save the error as missingField
Try
TextTrim article.source_name and save it as fieldValue.Trim article.source_name and save it as fieldValue.
Decisions & LoopsIf fieldValue isn't emptyIf fieldValue isn't empty
Yes
ValuesChange publisherPart to - fieldValue.Change publisherPart to - fieldValue.
No
No steps
On error
No steps
ValuesSet linkPart to blank.Set linkPart to blank.
Decisions & LoopsIf a step below fails, save the error as missingFieldIf a step below fails, save the error as missingField
Try
TextTrim article.url and save it as fieldValue.Trim article.url and save it as fieldValue.
Decisions & LoopsIf fieldValue isn't emptyIf fieldValue isn't empty
Yes
ValuesChange linkPart to Change linkPart to fieldValue.
No
No steps
On error
No steps
ListsAdd shownHeadline plus publisherPart plus linkPart to the end of digestLines and save it as digestLines.Add shownHeadline plus publisherPart plus linkPart to the end of digestLines and save it as digestLines.
No
No steps
On error
ValuesShow in the output: Skipped an article with no headline: articleError as text.Show in the output: Skipped an article with no headline: articleError as text.
ValuesSet heading to Morning news - newsTopic.Set heading to Morning news - newsTopic.
TextJoin digestLines with a blank line and save it as digestBody.Join digestLines with a blank line and save it as digestBody.
Decisions & LoopsIf digestLines is emptyIf digestLines is empty
Yes
ValuesChange digestBody to Nothing new in the last 24 hours on this topic..Change digestBody to Nothing new in the last 24 hours on this topic..
No
No steps
TextJoin sourceNotes with a space and save it as sourceNotice.Join sourceNotes with a space and save it as sourceNotice.
ValuesSet message to headingSet message to heading digestBody.
Decisions & LoopsIf sourceNotice isn't emptyIf sourceNotice isn't empty
Yes
ValuesChange message to messageChange message to message sourceNotice.
No
No steps
TextShorten message to 3900 characters and save it as message.Shorten message to 3900 characters and save it as message.
TelegramTelegramSend a message to chat digestChatId.Send a message to chat digestChatId.message