Daniel J Wilson

An Email-to-Input Pipeline with Claude Code

I consume a lot of podcasts, books, movies, and articles. Keeping track of them was always a friction point — enough friction that I mostly didn't bother, which meant losing references I wanted to revisit later.

So I built a simple pipeline: email a URL to myself, and a Claude Code skill turns it into a structured note.


How it works

The system has two parts: a Python script that fetches URLs from Gmail, and a Claude Code skill that processes each one.

1. Send an email. I forward or compose an email to a dedicated Gmail +inputs address. The body contains the URL. That's it.

2. The email subject controls metadata. The subject line is a simple flag system:

If the subject is F or FR, the finish date is automatically set to when the email was sent.

3. Run /input-batch. A Claude Code slash command triggers the pipeline. It connects to Gmail via IMAP, pulls unread emails from the +inputs address, extracts URLs, and deletes the processed emails.

4. Auto-detect and fetch metadata. Each URL is categorized by domain — Apple Podcasts becomes a podcast entry, Goodreads becomes a book, IMDB becomes a movie, and so on. Claude then fetches the page and extracts structured metadata: title, creator, duration, release date, cover art, and whatever else is relevant to the category.

5. Generate a summary. Each input gets a 2-4 sentence summary with key concepts bolded.

6. Create a markdown file. The note is written to my Obsidian vault as a markdown file with structured frontmatter — ready to be rendered on my website or queried later.

7. Commit and push. The content repo is automatically committed and pushed to GitHub, which triggers a site rebuild.


Handling NotebookLM

One edge case: I use NotebookLM to generate podcast-style audio summaries of papers and essays. These URLs require Google auth, so Claude can't fetch them directly.

The workaround: I attach a screenshot of the NotebookLM summary page to the email. Claude reads the image to extract the title, author, and publication date, then searches the web for any missing metadata.


Why email?

Email is the universal "share to" target. Every app on my phone can share a link via email. No special app needed, no API to configure, no bookmarklet to maintain. The subject line flag system (F, R, FR) adds just enough metadata without any real friction.

The whole thing takes about 5 seconds per input on my end. Everything else is automated.


The stack