Create a personalised news feed with AWS Lambda, Telegram and NewsAPI

Terry Yuen

Full implementation is here

The end goal is to allow us to filter and focus on the news that matter. If you’re new to Telegram, you may follow my previous example to create a telegram bot and channel. The news feeder is configurable through a config that looks like this.

query: {  language: 'en',  q: 'apple OR google OR amazon OR facebook', // keyword  sortBy: 'publishedAt'},filter: { // additional filter title: [  'google', 'amazon', 'tesla', 'facebook', 'netflix',  'intel', 'alibaba', 'nvdia', 'dropbox', 'spotify',  'microsoft', 'apple', 'nasdaq', 'trump' ]}

The serverless function accept query from config to construct complete API call and there’s additional filter to remove irrelevant news based on title because q will get all news by keyword

In order to deploy the application, run serverless deploy --stage=dev assume you created a .You can create more than one env config file.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade