Over the past few weeks, I built a personal project that has become one of my most useful tools: an AI-powered stock analysis assistant. It helps me analyse companies like a value investor, automatically tracks the top stocks weekly, and stores everything in Notion for future reference—all without me lifting a finger.
This post is a high-level look at the thinking behind it, the tools I used, and some of the key challenges I faced. Spoiler: AI agents are incredibly powerful—and surprisingly cheap.
The Goal
I wanted a system that could:
- Deliver automated weekly investment reports covering the top 20 most traded stocks.
- Let me request in-depth analysis of any stock on-demand.
- Use Buffett-style value investing logic, focusing on fundamentals.
- Work privately, run self-hosted, and be easy to manage.
- Archive all insights in Notion for later review.
- Notify me via email, with Telegram as the trigger interface.
The System Design
To make this happen, I used the following tools:
- n8n (community edition): Orchestrates the workflows and handles automation.
- Docker on Ubuntu: My self-hosted environment.
- Cloudflare Tunnel: Secure, remote access to n8n.
- Telegram Bot: A simple chat interface to request reports.
- OpenAI GPT-4: The AI brain behind all report generation.
- Financial APIs: For raw stock and financial data.
- Email (SMTP): Delivers reports directly to my inbox.
- Notion API: Stores each report for future access and documentation.
How It Works
1. Weekly Stock Digest
Once a week, a scheduled automation runs and:
- Pulls the 20 most traded stocks that week.
- Fetches their fundamental and market data.
- Uses GPT to generate a short summary per stock.
- Compiles the summaries into a report.
- Emails the report to me.
- Uploads it to a Notion page for tracking.

2. On-Demand Deep Analysis
This is where the system really shines.
I message a stock ticker (e.g., AAPL) to my Telegram bot. That triggers n8n to:
- Fetch detailed financials for the ticker.
- Use GPT to create a deep-dive, long-form value investing report.
- Send the report to my email.
- Upload it to Notion, so I can revisit it later.
It’s simple to use, and the quality of the analysis is surprisingly good.

Challenges I Faced
Like any good project, there were bumps along the way:
- Prompt engineering took time. Getting GPT to sound like a seasoned value investor without being generic required tuning.
- Notion’s API quirks meant I had to structure data cleanly and manage rate limits.
- Data inconsistencies in financial APIs meant I had to normalize input before feeding it to GPT.
- Coordinating outputs across Telegram, Email, and Notion required careful flow design in n8n.
Despite this, every problem was solvable—and I actually enjoyed figuring them out.
AI Agents Are the Future
What really surprised me was how inexpensive and effective this is.
The OpenAI API tokens cost pennies, yet the value they deliver is massive. I now get expert-style analysis on demand and weekly updates, without ever having to open a browser or spreadsheet.
This project made me realize: AI agents aren’t hype—they’re here, and they’re transformative.
Final Thoughts
What started as an experiment has become a reliable assistant I now use regularly. I can request a detailed stock breakdown with a single Telegram message and have the results waiting in my inbox and Notion. My weekly summaries keep me up to date effortlessly. Everything runs privately, on my own infrastructure, and is fully automated.
It’s a reminder that with the right tools, a bit of curiosity, and the help of AI—you can build things that feel like magic.
Leave a comment