I recently explored how to build my own personalized newsletter to avoid having to sift through multiple news websites every day. The app that I created fetches the latest news about a subject of my choosing from a news API, summarizes and filters the data with the help of ChatGPT, and sends it to my email. In this post, I'll walk you through how I accomplished this project.
Step 1: Tech Stack
After exploring various ways to achieve this, I opted for a no-code solution. In the end I chose the no-code platform Clevis to cobble together the required steps and automate the daily email sendout.
Step 2: Data Gathering
I started by finding a suitable news API. There are several options available, but I settled on one that provides up-to-date information about startups - NewsAPI.org. The API offered a range of endpoints and parameters to customize my data retrieval. In Clevis, I was able to call this API to fetch data about any subject for the current day.
Step 3: ChatGPT Integration
In Clevis I used the result from the NewsAPI.org API call and prompted it to summarize the news in the form of an HTML formatted newsletter.
Here is the prompt I used which works surprisingly well given the simplicity.
Step 4: Sending the email
Clevis comes with built in functionality for sending emails so I simply configured it to send the HTML formatted email that ChatGPT produced for me. Here is an example of how the email looked. ChatGPT even included images from the API response. I believe the formatting could be improved further either by tweaking the prompt or by using my own email template.
And here is how the finished app looks in the Clevis editor
Going forward
I belive I will continue to iterate on this project to use data from multiple news sources and websites. One challenge is the token limit of ChatGPT which I might have to find a way to get around.
Top comments (0)