Zero cost method for converting newsletter to RSS:
Cloudflare Workers allows for 100,000 free requests per day.
testmail.app's free tier enables you to receive 100 emails per month and the email are saved for one day.
If you are a student then you can apply for GitHub Student Developer Pack and for free get the testmail essential tier which allows you to receive 10,000 emails per month instead.
- Sign up for Cloudflare and testmail.app and activate them both.
- Setting up testmail.app
- Deploying to Cloudflare Workers
- Setting up RSS reader
- Navigate to https://testmail.app/console to get the
<testmail-namespace>
and<testmail-api-key>
. - Keep the browser tab and the values are required for <#deploying-to-cloudflare-workers>
Remarks: General
testmail provides a rich API for getting emails, including filtering tags, matching tag prefixes, limiting counts, and support for GraphQL queries.
The official documentation is here: https://testmail.app/docs/
Remarks: Example
Suppose the namespace is diyyy
,One can construct such an email address like diyyy.{tag}@inbox.testmail.app
where {tag}
can be replaced by anything.
For example,one can use diyyy.quartz@inbox.testmail.app
to subscribe to Quartz's newsletter,or use diyyy.stefanjudis@inbox.testmail.app
to subscribe to Stefan's web dev journey.
- Create a new worker, if one hasn't been yet created and deploy the default Hello World.
- Setup Cloudflare environment variables by creating two new Text variables named
and use the testmail credentials.
TESTMAIL_NAMESPACE : <testmail-namespace> TESTMAIL_API_KEY : <testmail-api-key>
- Edit the code in the online editor and replace it with
mail2rss.js
and deploy.
- Navigate in a browser to
https://<name-of-worker>.<cloudflare-username>.workers.dev/
- Add a specific tag e.g.
<my-cool-tag>
. - Copy the generated email for the newsletter e.g.
<testmail-namespace>.<my-cool-tag>@inbox.testmail.app
- Copy the generated subscribe address into a RSS feed reader app e.g.
https://<name-of-worker>.<cloudflare-username>.workers.dev/<my-cool-tag>
Remarks
Subscribing to https://<name-of-worker>.<cloudflare-username>.workers.dev/
will result in an empty feed as no tag is defined.
These tools can help with debugging:
- Cloudflare's online code editor: within the editor one can create a request directly to
https://<name-of-worker>.<cloudflare-username>.workers.dev/{tag}
and debug using the integrated Developer's Tools - https://www.rssboard.org/rss-validator/check.cgi: to check the validity of the generated RSS feed
- https://html.onlineviewer.net/: to view the HTML of the newsletter
- barefootstache
- Artin (original author)