I Built an AI Agent That Emails Me a Newsletter Every Morning
A Claude Code agent that emails you a Morning Brew-style brief at 6 AM from sources you actually trust.
What you'll build
A personal morning newsletter agent in Claude Code. Every morning at 6 AM it pulls from news sources you actually trust, writes a Morning Brew-style brief - short bullets, clean formatting, a two-minute read - and emails it to you. The part that makes it better than any real newsletter: you can reply to the email. Reply "tell me more about this" and a deep dive lands in your inbox within 3 minutes. Reply "keep this topic for tomorrow" and it saves that to memory and follows up in the next day's brief.
Mine covers AI, tech, markets, politics, New York local news, and a few dumb-but-fun tidbits at the end. Yours covers whatever you ramble at it.
What you'll need
- Claude Code set up in your terminal (if you're not set up yet, my Claude Code 101 video walks through installing it and Antigravity)
- A Gmail account
- A free Groq API key (no payment method required)
- A Google Cloud project for the Gmail API (free, ~5 minutes of clicking)
- A voice dictation tool helps a lot - I use Wispr Flow
Step 1: Put Claude in plan mode and ramble
Open Claude Code, switch to plan mode, and explain the whole idea out loud - I went for three to five minutes with voice dictation. What sources you trust, what topics you care about, what time you read email, the reply-to-customize behavior, all of it. The quality of this automation is basically the quality of this ramble.
For planning, Sonnet (or even Haiku) is fine - no need for Opus yet.
Step 2: Use /btw to add anything you forgot
I told it I wanted the email formatted like Morning Brew and then forgot to attach the screenshot. You don't have to restart - just type /btw and drop in the screenshot and a link while it's thinking. It picks the new context up mid-plan. Genuinely one of the most useful commands when you're giving it reference material.
Step 3: Answer its questions - choose free everything
Plan mode will come back with clarifying questions. My answers, to keep version one simple:
Gmail send/read mode: the recommended option
Newsletter generation: use a free and open model (Groq)
Storing my preferences: local JSON
News data sources: free sources for now
Reply detection: the recommended option
You can always upgrade later - give it your Anthropic API key and Perplexity access down the line for higher-quality briefs. Free tier first, prove it works.
Step 4: Approve the plan and switch to Opus to build
Review the plan, hit yes with auto-accept, then switch the model to Opus before it builds. Sonnet is fine for planning, but Opus one-shots builds like this where Sonnet might take two or three rounds of fixes. Toggle bypass permissions, let it go to work, and go make coffee.
Opus burns through usage faster - I bought $5 of credits to finish this build. Consider it an investment; switch back to Sonnet for everything that isn't the build step.
Step 5: Get your free Groq API key
Claude will ask for a Groq key (Groq with a Q - the fast inference provider, not the Twitter one). Create a key at their console - I named mine newsletter-daily-news, no expiration - and paste it into the chat.
Normally, don't paste API keys into chat - your history sits on Anthropic's servers, and a leaked key with billing attached is really bad. I'm fine with it here only because Groq's free tier has no payment method connected. Don't do this with keys tied to a card.
Step 6: Enable the Gmail API in Google Cloud Console
This is what lets the agent send your brief and watch for replies:
- Go to Google Cloud Console and create a new project (I called mine
Jarvis Newsletter, no organization needed) - APIs & Services → Enable APIs and Services → search Gmail API → Enable
- OAuth consent screen → External → name it, add your email as the support email, click through the rest
- Credentials → Create credentials → OAuth client ID → application type Desktop app → create → download the JSON file
If you get lost anywhere in Google Cloud Console (I still do), screenshot the screen and paste it to Claude with "where is it?" - it'll point you to the exact button.
Step 7: Fix the "access blocked" error
First auth attempt, I hit Access blocked. Screenshot it, paste it to Claude - the fix is going to the Audience section of your OAuth consent screen and adding yourself as a test user. Re-run the auth, grant access, done.
Step 8: Check your inbox
Once authenticated, the first brief fires. Mine led with iPhone 17 Pro leaks - quick, to the point, clear formatting, bullets per topic. From here you can feed it the specific sources you want it pulling from instead of whatever it defaulted to.
Step 9: Test the reply loop
Reply to the newsletter like you'd reply to a person. I sent:
Tell me more about the NYU professors' strike
The reply monitor is a cron job that polls every 3 minutes, so within 3 minutes a full deep dive on that story hit my inbox - same clean formatting, no manual command needed.
That's the whole build. Instead of trusting one biased source, you pick the sources you trust, it combines them into one report on the stuff you actually care about, and when something's interesting you just reply to go deeper or keep it on tomorrow's docket. Good luck and happy building.
Resources
- Groq (free API key, no card required): https://console.groq.com
- Google Cloud Console (Gmail API + OAuth): https://console.cloud.google.com
- Wispr Flow - the voice dictation I ramble the plan with, 1 month free: https://wisprflow.ai/r?AUSTIN16480
- My free skills repo: https://github.com/austinpeechatt/creator-skills
Some links in this guide are affiliate links. They cost you nothing and support the free guides.