Automated AI-powered country risk intelligence system for investment banking — monitors 5 African countries daily using Groq LLaMA, NewsAPI and n8n
# 🌍 Automated Country Risk Analyst
> AI-powered country risk intelligence system for investment banking — monitors African markets daily using Groq LLaMA, NewsAPI and n8n workflow automation.
---
## Overview
This system automatically ingests live news for 5 African countries every morning, analyses it using a large language model, and delivers structured investment banking intelligence directly to your inbox — completely free to run.
**Countries monitored:** Ethiopia · Uganda · Rwanda · Zambia · Gabon
---
## What it does every day
- Fetches 20 latest news articles per country via NewsAPI
- Sends articles to Groq LLaMA 3.3 AI for analysis
- Generates structured risk scores across 6 dimensions
- Writes an executive briefing with IB implications
- Flags deal opportunities (M&A, IPO, Project Finance)
- Raises critical alerts for high-risk events
- Delivers a formatted HTML email report to your inbox
- Saves all results to Supabase database for historical tracking
---
## Risk dimensions scored
| Dimension | Description |
|---|---|
| Political stability | Government stability, elections, civil unrest |
| Geopolitical risk | Regional conflicts, international relations |
| Regulatory risk | Policy changes, compliance environment |
| FX / Currency risk | Exchange rate volatility, capital controls |
| Sanctions exposure | International sanctions and restrictions |
| Corruption index | Transparency and governance quality |
---
## Tech stack
| Layer | Tool | Cost |
|---|---|---|
| Automation / Scheduler | n8n (self-hosted) | Free |
| News ingestion | NewsAPI | Free tier |
| AI analysis | Groq LLaMA 3.3 70B | Free tier |
| Database | Supabase | Free tier |
| Email delivery | SMTP / Gmail | Free |
| Language | JavaScript (n8n Code nodes) | — |
**Total monthly cost: $0**
---
## How it works
```
Daily Trigger (06:00)
↓
Country List (5 countries)
↓
Fetch News (NewsAPI — 20 articles per country)
↓
Prepare Headlines (build AI prompt)
↓
Groq LLaMA AI Analysis (risk sc …