Part 1: https://www.indiehackers.com/post/my-first-coded-project-part-1-6f39fe5798
Part 2: https://www.indiehackers.com/post/my-first-coded-project-part-2-0c77d887b0
So, I recently spent about 80 hours building a new project called https://ledigest.email/.
The idea behind it was to automate some of the mundane tasks I do every morning, like checking the weather, reviewing my tasks and meetings for the day, and looking at popular products on Product Hunt. I wanted to send all this information in a daily, automated email. Here's what it looks like: https://ledigest.email/demo.png
But the ultimate feature I wanted to build was the ability to stop receiving the email newsletters I'm subscribed to throughout the day and instead, receive them all in my daily automated email as hyperlinks. And I did it! Here's an example: https://ph-files.imgix.net/24681c12-a7a6-4533-842f-7833151a42db.png
So how did I build that last feature? I used a Postmark inbound server, Netlify lambda functions and user metadata.
Here's how it works:
- I create a unique email address that's linked to the ID of your ledigest.email account. For example, 0dbfb909-9423-4398-9f4b-cc8d9cb2346a@XXX.com. You subscribe to any newsletter you want to receive using that email address.
- Each time an email is sent to that address, the Postmark inbound server receives it, parses it, and posts the JSON data to my lambda function through a webhook. The lambda function locates the user with the ID in the email address (found in the JSON, and then saves a new entry in the user's metadata: the postmark ID of the message received.
- When the daily automated email cron runs every morning, user metadata is checked to populate and send the daily email accordingly for each user. When it gets to the newsletter section, it does the following:
-- If a postmark ID is in the metadata, it means there is a new newsletter received and we need to add it to the daily email.
-- Using the postmark ID, we do an API call to the postmark server to retrieve the subject line of the newsletter received to insert it into the email as a bullet point. That bullet point, with the subject line of the email, is also hyperlinked: it links to a lambda function (more below).
-- When the daily email is sent, the user opens it and clicks on the subject line of the newsletter received, it opens a new tab calling the lambda function which executes the last step: using the postmark ID of the newsletter received, it calls the Postmark API to fetch and render in the browser the entire HTML of the email. I think that last part is pretty cool!
That's it for my first coded project. I launched it on Product Hunt and got a few users, but I don't plan to develop or market it further. If you have any questions, feel free to ask!