How to Forward Newsletters Into a GitHub Repo of Notes
Three tested ways to get newsletters into a GitHub repo as Markdown: a weekly GitHub Action for RSS, an email Worker that commits each issue, or email-to-feed.
The Short Version
- A weekly GitHub Action can save each feed issue to your repo as one Markdown file.
- A Cloudflare Email Worker can turn each forwarded email into a file in your repo.
- Any helper that writes to your repo needs a key limited to that one repo.
- Kill the Newsletter turns email into a feed with no domain, but deletes entries after one month.
- Keep full issues in Inbox/ and move at most two claims per issue into your notes.
On this page
- Forward Newsletters to GitHub by the Route That Fits How They Arrive
- Route 1 Saves Feed Issues With a Weekly GitHub Action
- Route 2 Saves Each Email With a Cloudflare Email Worker
- Route 3 Turns Email Into a Feed Without a Domain
- Repo Size Never Becomes the Problem, but Git Never Forgets
- Test the Pipe With Three Issues Before You Trust It
- Keep the Inbox Folder Separate From Your Notes
- Name Each File for a One-Step Search
- Forwarding to a Repo Is the Wrong Move in Two Cases
- Example: One Forwarded Issue Becomes One Note
- Start Route 1 This Week
- Questions and Answers
You subscribe to newsletters because they hold ideas you want to keep. Then the issues sit in Gmail, where your notes and your agents never see them. To forward newsletters to GitHub, pick one of three routes: a weekly GitHub Action for newsletters with a feed, a Cloudflare Email Worker for email-only ones, or an email-to-feed service.
All three routes end the same way. Each issue becomes one Markdown file in an Inbox folder of your repo, ready for you or your agents to read. I tested the first two routes on 20 Nov 2026. Each section says what the route needs and what can break.
Forward Newsletters to GitHub by the Route That Fits How They Arrive#
| Route | Use it when | You need |
|---|---|---|
| GitHub Action plus RSS | The newsletter has a feed | A GitHub repo |
| Email Worker | The newsletter only sends email | A domain on Cloudflare DNS |
| Email-to-feed service | You want email without a domain | A free account, and a one-month limit |
| Hosted email script | You want email without a domain, as files | A Val Town account and a GitHub token |
Start with RSS. It has the fewest moving parts, and most newsletters have a feed. Substack serves one at /feed on every publication. Paste any newsletter address into the free newsletter RSS finder to get its feed, or read the guide to finding the RSS feed of any newsletter.
Route 1 Saves Feed Issues With a Weekly GitHub Action#
This route runs inside GitHub, so no computer of yours needs to stay on. A GitHub Action is a small job GitHub runs for you on a schedule. Once a week it reads your list of feeds, saves each new issue as a Markdown file, and adds the files to your repo.
The setup has three parts:
- A plain text list of the feeds you follow, one address per line.
- A small helper that turns a feed into Markdown files. The method for turning newsletters into Obsidian notes describes it.
- A schedule file that tells GitHub to run the helper every Monday at 07:00 UTC, with a Run button for tests.
GitHub's guide to scheduled workflows shows how to write the schedule file. I ran the same job in a test repo. The first run saved 6 new issues. The second run found nothing new and changed nothing, so you never get empty updates.
GitHub's docs add three limits:
- Scheduled jobs run only on the default branch.
- A scheduled run can start late when GitHub Actions is under high load.
- In a public repository, schedules turn off after 60 days with no repository activity.
The 60-day rule names public repositories, which is one more reason to keep a notes repo private.

Route 2 Saves Each Email With a Cloudflare Email Worker#
Some newsletters have no feed. For those, you need an email address that turns mail into a file in your repo. GitHub has no such address, so a Cloudflare Email Worker plays that part. A Worker is a small program Cloudflare runs each time an email arrives.
The setup has four parts:
- A domain that uses Cloudflare DNS, with Email Routing turned on.
- A Worker that reads each email and writes it to your repo as a Markdown file.
- A routing rule that sends one private address to the Worker.
- A Gmail filter that forwards the newsletters to that address.
Cloudflare's Email Routing setup guide covers part 1. Onboarding adds the mail records for you.
The Worker Turns One Email Into One File
The Worker does four things with each email:
- It rejects mail sent to any address but yours.
- It keeps the plain text of the email and drops the images.
- It adds a short header with the sender, the subject and the date.
- It saves the file to your repo through GitHub's contents API.
Cloudflare's Email Workers reference shows how a Worker reads a message. I ran my Worker on 20 Nov 2026 with a test message. A subject with accented letters came through unchanged, and mail to a wrong address was rejected.
One Narrow Key Protects Your Repo
The Worker needs a GitHub key to write files. Create a fine-grained token for the one notes repository. Give it the Contents permission with write access, and nothing else. GitHub's permission table lists Contents write as the access this needs. Store the key in the Worker's secret settings, never in its code.
Pick an inbox address nobody can guess. Anyone who learns it can send mail that lands in your repo, so treat it like a password.
A Gmail Filter Sends Only the Newsletters
In Gmail, add the Worker address as a forwarding address first. Gmail sends a confirmation email to it. That email lands in your repo as a file, so open the file to find the confirmation code.
Then build the filter, following Gmail's forwarding help page:
- Search for the newsletters by sender.
- Click Create filter.
- Choose Forward it, pick the Worker address, and save.
Route 3 Turns Email Into a Feed Without a Domain#
If you have no domain, an email-to-feed service gives you an address and a feed. Kill the Newsletter is free and works this way. You subscribe with its address, then add its feed to your feed list and let Route 1 save the issues.
Its home page lists the catch. It deletes entries older than one month. A weekly Action saves each issue to your repo well before that.
A Hosted Script Skips the Domain Too
Val Town runs small scripts in the cloud, and each script can get its own email address. One public script by George Mandis receives an email and creates a Markdown file in a GitHub repo you name. It was built for blog drafts, and the same idea fits newsletters.
Its author notes that Gmail did most of the HTML-to-Markdown work for him. Other mail providers may not. So forward one heavy, image-rich issue as a test before you set up a filter.
Repo Size Never Becomes the Problem, but Git Never Forgets#
People worry that a repo of newsletters will grow too big. The numbers show it stays small for decades. On 20 Nov 2026 I measured the last 20 Import AI issues and the last 8 Platformer issues from their feeds. As plain text, an issue averaged 17.3 KB and 12.0 KB.
Take 15 KB as a round figure. Ten weekly newsletters then add about 150 KB a week, or under 8 MB a year. GitHub's guidance on large files recommends a repository stay under 1 GB. You would need over a century to get there.
The real risk runs the other way. Git keeps every file you ever committed, even after you delete it. So a receipt or a private email that slips into the Inbox folder stays in the repo history. Only a history rewrite takes it out.
That gives one rule for the filter. Match newsletters by exact sender, one address at a time. A broad filter, such as any mail with "unsubscribe" in it, also catches bank alerts, orders and password resets.
One more detail hides in each issue. Most newsletters put an unsubscribe link with a personal token in the footer. Anyone who can read the repo can click it. Keep the repo private, or have the Worker drop the footer before it saves the file.
Test the Pipe With Three Issues Before You Trust It#
A route that works on one tidy issue can still fail on the next one. Before you forward newsletters to GitHub for good, send three test issues and open each file in the repo.
- An issue with accented letters in the subject. Check that the file name and header kept them.
- An issue heavy with images and buttons. Check that the text still reads in order, with links intact.
- A paid issue that arrives as a preview. Check whether the file holds the full text or one paragraph. Paid feeds often send only the preview, so email is the route for those.
If one test fails, fix that route before you add a filter. A broken file each week is easy to miss for a month.
Keep the Inbox Folder Separate From Your Notes#
Each route fills the Inbox folder with full issues. Those files are sources, and they are long. If they sit beside your notes, every search and every agent wades through them.
So treat the Inbox folder as a queue. Each week, take at most two claims from each issue into your notes, then delete source files older than 30 days. Tell your agents about the split in AGENTS.md or CLAUDE.md. The free AGENTS.md generator writes that file for you, and the guide to keeping your second brain in a GitHub repo explains the folders.
Brainfeed works from the same inputs. It reads newsletter feeds, and a forwarding inbox takes email-only newsletters. That inbox accepts mail only from your account email or senders you allow, and it drops mail that fails sender checks. Agents then compare each idea to your notes, and only ideas you accept reach the repo, as one pull request.
Name Each File for a One-Step Search#
A folder of 500 issues is only useful if you can find one issue fast. So give every file the same name pattern and the same short header.
Start the file name with the date, then the sender, then the subject. For example, 2026-11-20 Sender Name Subject.md, with the real names in place. The date first sorts the folder by time with no extra work. The sender second lets you scan one newsletter at a glance.
Put four fields at the top of each file: the sender, the date, the subject and the link to the web copy. Agents read those lines first, so they can skip a whole issue in one look. The guide to Markdown frontmatter for AI agents explains why the header matters.
Keep the subject short. Strip words such as "Issue" and the emoji many senders add, because they make file names hard to type.
Forwarding to a Repo Is the Wrong Move in Two Cases#
A repo of raw issues helps only if something reads it. Skip these routes in these cases.
- You never open the Inbox folder. The issues pile up in git instead of Gmail, and nothing changes.
- Your notes live in an app with no git repo. The Action and the Worker both write through git or the GitHub API.
Example: One Forwarded Issue Becomes One Note#
Example. This is demo content, not a real run.
- Input: The Inbox folder gains an issue that argues private notes repos should hold no keys.
- Card: labeled builds on, linked to your note on secrets.
- You swipe: accept.
- Note in the repo: a new note under
brainfeed/, added in one pull request you merge. The full issue stays in the Inbox folder.
Start Route 1 This Week#
Find the feeds of the newsletters you read with the newsletter RSS finder. Set up the weekly Action, click Run workflow once, and check that the Inbox folder filled up.
To see which newsletters fit the notes in that repo, run the free Brainfeed scan. It reads up to 40 notes in your browser and ranks 41 newsletters against them.
Brainfeed then does the weekly reading for you. Agents compare every new idea with your notes, you swipe, and only accepted ideas reach your repo. Your first pull request is free, and Starter costs $9 for your first month, then $19. Start at brainfeed.atharvashah.com/#join.
Questions and Answers#
- Can I email a file straight into a GitHub repository?
- GitHub has no email-to-repo address. You need a small service in between. A Cloudflare Email Worker can receive mail at an address on your domain, turn it into Markdown, and commit it with the GitHub contents API. The token needs Contents write access on one repository.
- What is the easiest way to get newsletters into a GitHub repo?
- Use RSS if the newsletter has a feed. A scheduled GitHub Action wakes up once a week, saves each new issue as a Markdown file, and adds it to your repo. It needs no server and no email setup. Substack feeds live at the publication address plus /feed.
- How do I forward only newsletters from Gmail?
- Add and verify the forwarding address in Gmail settings first. Then search for the newsletters, for example with from: or list:, click Create filter, choose Forward it, and pick the address. From then on, Gmail forwards only the mail that matches the filter.
- Is it safe to give a Worker a GitHub token?
- Limit the damage it can do. Create a fine-grained token for the one notes repository, with Contents read and write and nothing else. Store it in the Worker's secret settings, never in the code itself. Anyone who learns the inbox address can send it mail, so treat the address like a password.
- How do I convert an email newsletter to Markdown?
- Keep the plain-text part of the email, or run the HTML part through an HTML-to-Markdown converter. Gmail already sends a plain-text part with most newsletters. Add a short header with the sender, subject and date, then save it as a .md file. Links survive as text, and images drop out.
- What happens to newsletter images and links in the repo?
- The Worker in this guide saves the plain-text part of each email, which keeps the links as text and drops images. That is enough for notes and search. Keep the original email in your mail account if you need the layout.
Read Next#
- How to Find the RSS Feed of Any Newsletter or SubstackFind the RSS feed of a Substack, Beehiiv, Ghost, WordPress, Medium or Buttondown newsletter. URL patterns tested on 20 Nov 2026, plus a fallback for the rest.
- How to Turn Newsletters Into Obsidian NotesA weekly method to turn newsletters into Obsidian notes: pull issues by RSS, keep two claims per issue, link each to a note you have, and drop the rest.
- Second Brain in a GitHub Repo: Setup and Trade-OffsSet up a second brain in a private GitHub repo in six steps, with Obsidian Git, agent rules and a monthly restore test. Plus the limits on mobile and files.
- For Claude Code usersGive Claude Code Memory From the Newsletters You ReadBrainfeed turns newsletter ideas you accept into Markdown notes in your repo, so Claude Code reads what you learned this week before it starts a task.
Keep the Best Ideas From Every Newsletter
Paste a GitHub repo of Markdown notes. The free scan shows which of 41 newsletters fit what you already know.
No account needed. Your first pull request is free.
ExampleFrom a newsletter issue
Small teams now ship with one agent per repo.
Builds on agents.md