A self newsletter service built for my personal use to cope with the pace of AI research progress.
Feel free to try the repo and fork it to adapt to your needs. Keep in mind that this was created to suit my workflow ( and my chaos), if you like to adapt to yours - you can do it by fitting your workflow in src/selfletter/cli.py
This service reads URLs clipped / added to a notion database and summarizes the contents ( based on this prompt) , sends a daily digest as a newsletter to my mail box.
I have written more about the intention here. Take a look at an example newsletter .
Notion Integration
- Go to Notion Integrations
- Create a new integration
- Copy the Internal Integration Token
- Share the Inbox database with the integration
Email Integration ( to receive the summaries to your email )
The service is tested to work with Gmail using the Google application password
Processors:
The service supports URL processing for these links:
Arxiv: Arxiv abstract , pdf , html urlsHuggingface pages: Hugginface page to full paper contentBlog post URLsYoutube Videos
All text content are parsed from source using r.jina.ai endpoint to fetch LLM suitable format.
3. Environment Variables
Copy .env.example to .env and fill in your values:
Required variables:
NOTION_TOKEN- your Notion integration tokenNOTION_SOURCE_DB_ID- ID from the Inbox DB URLAPI_KEY- your OpenAI API keyENDPOINT- openai compatible / Openrouter chat completion endpointMODEL- model you want to use, ex.openai/gpt-oss-120b.SMTP_USER- your email idSMTP_PASS- your application password from gmailEMAIL_TO- your email id
Optional:
OUTPUT_DIR- output directory (default:newsletter)
4. Setup and Local Testing
Setup:
# make sure you have `uv` installed # (see https://docs.astral.sh/uv/getting-started/installation/) git clone https://github.com/infinitylogesh/selfletter.git uv venv source .venv/bin/activate uv sync
Testing:
# cd selfletter
PYTHONPATH=src python -m selfletter.cliDeployment (GitHub Actions)
This project includes a GitHub Actions workflow for free daily execution:
- Create a private repo and push this code
- Add all the env variables as secrets in
.github/workflows/daily.yml - The workflow runs daily at 01:00 UTC automatically
Acknowledgement and Gratitude:
- Thanks to Jina.ai for the free reader endpoint
- Thanks to Github Actions service for making this service simpler.
- Thanks to Andrew Ng's advice. The prompt is based on the advice.
- This repo was mostly vibe coded with Blackbox Cli