- Silvia's Experiments
- Posts
- Building a Mini-App That Emails Summaries of Huberman’s Videos
Building a Mini-App That Emails Summaries of Huberman’s Videos
Can you get key takeaways from Huberman’s videos straight to your inbox? With AI, I’m experimenting to make this happen.

Reading time: 7 min
Those who know me know that I am a big Huberman fan.
But let's face it, as interesting as his videos are, time is limited.
So with this time scarcity problem, a question emerged: Could I build a system to get summaries and highlights from his videos, and then decide if I want to watch specific parts?
As my programming knowledge is basic, this would’ve been much harder 3 years ago. But, with a little AI magic, the task didn’t seem so impossible this time.
So here we go! I created my mini-app that sends the most relevant insights from Huberman’s YouTube videos straight to my inbox.
Let me walk you through my experiment!

Why I Built This
Huberman Lab episodes are packed with insights. But like I said, the majority are very long (at least his lecture videos, even though he now publishes 30–45 min cuts). I wanted something simple:
Detect new videos from the Huberman Lab YouTube channel
Pull the transcript
Summarize it using GPT
Format it nicely and email it to myself
And for this project, I wanted: no Zapier, no Replit, no n8n, just a local Python script I could fully control.
It is worth mentioning: I did try n8n, but the transcript step failed. The local library I used simulates a browser and grabs captions directly from YouTube, even auto-generated ones. The version used in n8n was a third-party API wrapper, which often breaks on auto-generated or restricted captions.
Note: Eventually, I had to filter videos by duration (no shorts, and no 3-hour deep dives), because of the token limitations (I purchased a limited OpenAI subscription).
The Full Architecture
Here’s how it works:
Fetch latest video using the YouTube Data API
Filter by length (only between 10 and 60 minutes)
Extract transcript with
youtube-transcript-apiSummarize using GPT-4o with a structured prompt
Format summary into HTML with clear sections:
Overview
Key Points
Practical Takeaways
Quotes
Recommended Actions
Send via email using SendGrid
Track processed videos in a JSON file
What I Built
It is important to say this again: I used AI as my personal assistant to build this project.
I am sharing the project here, on GitHub.
For software developers, this is probably a piece of cake.
For me, it was a fun and useful project to build.
What Broke (and How I Fixed It)
🔐 API & Deployment Issues
youtube-transcript-apifailed on GitHub Actions due to subtitles or IP restrictionsGoogle Cloud Run had permission and timeout errors
Fix: I decided to keep it local for now.
📩 Email Rendering Bugs
I had challenges with how Gmail displayed the HTML
Markdown from GPT sometimes broke layout
Fix: I stripped the markdown, cleaned formatting, and focused on a “good enough” instead of perfect email look.
🧪 Prompt Instability
GPT sometimes skipped sections or repeated itself
Fix: I made the prompt ultra-specific.
What I Learned
This wasn’t just about building a mini-app. It was about getting my hands dirty with:
API integration → YouTube, OpenAI, and SendGrid
Prompt engineering → how to ask the right questions to get structured, consistent AI output
Basic DevOps → using
.env, GitHub Actions, and debugging cloud permission issuesWriting some Python → building functions, handling errors, and thinking about edge cases
Using AI to build, and learning while doing!
How I Use It
I set a cron job that runs daily (with the limitation that my laptop needs to be open). Or I just run the script manually, as it takes 20 seconds.
source ~/huberman_summary/venv/bin/activate
python fetch_videos.pyI get a neat, actionable summary in my inbox. And I don’t even need to watch a minute of video.
Next Steps
I wanted to make this available for our small community here, but there is a copyright limitation.
Other people have already tried similar projects and had to take them down.
Of course, I can always share bites of information from my summaries in this newsletter, as long as it doesn't violate the copyright constraints.

Someone shared on X the request to shut down his app.
A Few Summary Emails (Screenshots)
I am adding a few examples from the emails below, so you can see the final result.





Why It Was Fun
This was the first time I felt like I was really building with AI.
Not just asking ChatGPT to help me learn or brainstorm, but using it as a core component in a working system. It wasn’t always smooth, and it’s not fully automated.
But it’s mine. And it works.
And YES, prompt engineering is important. Having some coding knowledge speeds up the building process. This project reminded me:
I have the logic to create a workflow and understand limitations,
If I want to keep doing this, I need to sharpen my coding skills (which I’ll see if it makes sense for my longer-term goals, but based on this experience, it was an insightful learning).
If you’ve ever wondered, “Can I build something useful with just a little code and AI?”, the answer is: Yes.
And it’s honestly a lot of fun.
Until next time!
Hugs,
Silvia
Reply