An AI-powered Telegram bot that aggregates publicly available savings rates and investment returns across Nigerian fintech platforms — and lets you query them in natural language.
Instead of opening six different apps to compare rates, ask one bot: "Which platform has the best flexible savings rate?" and get a clear, data-backed answer.
- PiggyVest
- Cowrywise
- Palmpay
- Opay
- Risevest
- Bamboo
- More added continuously
User asks a question on Telegram
→ n8n fetches latest data from Notion database
→ JavaScript aggregates and cleans the data
→ AI Agent (Gemini via OpenRouter) reads data and answers
→ Reply sent back to Telegram
The data is manually maintained in a Notion database with the following columns:
| Column | Description |
|---|---|
| APP | Platform name (e.g. PiggyVest) |
| Plan Type | Savings or Investment |
| Category | Specific product (e.g. SafeLock, Flex Naira) |
| Withdrawal Type | Flexible, Semi-locked, Locked, Fixed |
| Interest per annum | Annual interest rate (pre-tax) |
| YTD Returns | Year-to-date returns for investment products |
| Notes | Additional context |
| Date Last Updated | When the data was last verified |
- n8n — workflow automation (self-hosted on DigitalOcean VPS via Docker)
- Notion — data store for rates and returns
- Telegram Bot API — user-facing interface
- OpenRouter (Gemini 2.5 Flash) — AI agent for natural language queries
- Cloudflare Tunnel — HTTPS for Telegram webhooks with custom domain
- A VPS (Ubuntu) with Docker installed
- A Telegram bot token (via @BotFather)
- A Notion account with an internal integration
- An OpenRouter API key
- A Cloudflare account (for HTTPS tunnel)
git clone https://github.com/YOUR_USERNAME/ratetrackr.gitCreate a database with the columns listed above. Share it with your Notion integration. Every row must have the APP field filled — no blank grouping rows.
mkdir ~/n8n && cd ~/n8nCreate docker-compose.yml:
version: '3.8'
services:
n8n:
image: n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- WEBHOOK_URL=https://your-subdomain.yourdomain.com/
volumes:
- ~/.n8n:/home/node/.n8ndocker-compose up -dIf you get an EACCES permission error:
sudo chown -R 1000:1000 ~/.n8ncloudflared tunnel login
cloudflared tunnel create n8n
cloudflared tunnel route dns n8n your-subdomain.yourdomain.comCreate ~/.cloudflared/config.yml:
tunnel: n8n
credentials-file: /etc/cloudflared/<TUNNEL_ID>.json
ingress:
- hostname: your-subdomain.yourdomain.com
service: http://localhost:5678
- service: http_status:404Install as a service:
sudo mkdir -p /etc/cloudflared
sudo cp ~/.cloudflared/config.yml /etc/cloudflared/
sudo cp ~/.cloudflared/*.json /etc/cloudflared/
sudo cloudflared service install
sudo systemctl start cloudflaredOpen n8n, go to Workflows → Import from File → select workflow.json from this repo. Then:
- Set up credentials for Telegram, Notion, and OpenRouter
- Select your Notion database in the "Get many database pages" node
- Activate the workflow
- "What's the best savings rate right now?"
- "Compare PiggyVest and Cowrywise"
- "Which platform has the highest investment returns?"
- "Show me all flexible savings options"
- "What are Risevest's rates?"
- Notion over Google Sheets — Google Cloud service account setup was unnecessarily complex for this use case. Notion's integration system is simpler.
- Manual data entry — Nigerian fintechs don't offer public APIs for rate data. Scraping violates ToS and risks account suspension. Manual entry is the only clean approach.
- Code node for aggregation — Without aggregating Notion results into a single item, the bot sends one Telegram message per database row. The Code node merges everything into one payload.
- HTML parse mode — Telegram's MarkdownV2 is strict about escaping special characters. HTML is more forgiving.
- Data is manually maintained — rates are only as current as the last update
- The AI model (Gemini 2.5 Flash) occasionally ignores formatting instructions
- No personal account linking — this is a public rate comparison tool, not a portfolio tracker
MIT