Consolidated KPI Reporting Bot
Data pipeline that synchronizes cross-platform analytics into unified Slack notifications.
Founders were logging into 5 different tools daily just to check core metrics.
Built a chron-scheduled worker that polls Stripe, Analytics, and SQL databases, delivering daily summaries.
- Absolute metric transparency
- Zero daily dashboard logins
- Immediate anomaly detection
Overview
The Consolidated KPI Reporting Bot is an internal automation tool designed to solve the operational inefficiency of manually checking multiple platforms for critical business metrics. It functions as a scheduled data pipeline, aggregating key performance indicators (KPIs) from disparate sources and delivering a concise, formatted summary directly to a designated Slack channel.
Problem Statement
Founders and operators often waste significant time logging into various SaaS tools (e.g., Stripe, Google Analytics, PostHog, internal databases) to gather a daily performance snapshot. This process is repetitive, prone to oversight, and delays the detection of anomalies.
Technical Solution
This bot is implemented as a chron-scheduled worker (or equivalent job scheduler). At a configured interval (e.g., daily at 9 AM), it executes a sequence of API calls and database queries to fetch pre-defined metrics. The data is then processed, formatted into a human-readable report, and sent via a Slack Incoming Webhook.
Architecture & Data Flow
- Scheduler Trigger: A cron job initiates the main worker process.
- Data Extraction: The worker concurrently or sequentially polls configured sources:
- Stripe API: Fetches revenue, MRR, new customers, and churn.
- Analytics API (e.g., PostHog): Retrieves active users, feature adoption, and conversion rates.
- SQL Database: Queries for application-specific metrics (e.g., new sign-ups, task completion rates).
- Data Transformation: Raw data is parsed, and key calculations (e.g., week-over-week growth) are performed.
- Report Generation: A standardized message template is populated with the calculated values and trends.
- Notification Delivery: The final report is posted to Slack using a secure webhook integration.
Configuration
Core configuration is managed via environment variables or a config file:
STRIPE_API_KEY=sk_live_...
POSTHOG_API_KEY=phk_...
POSTHOG_PROJECT_ID=...
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
DATABASE_URL=postgresql://...
CRON_SCHEDULE="0 9 * * *"
Impact
- Absolute Metric Transparency: Ensures the entire team sees the same core data daily.
- Zero Daily Dashboard Logins: Frees up operator time by eliminating manual checks.
- Immediate Anomaly Detection: Rapid surface-level visibility into metric deviations prompts faster investigation.
Stack
- Stripe API
- PostHog / Analytics API
- Slack Incoming Webhooks
- Cron Jobs (or systemd timers / cloud scheduler)
- PostgreSQL / SQL Database
- Python/Node.js/Go (Worker runtime)
Have a workflow like this?
If it keeps repeating, it can become a system. Tell us what it looks like today.
Start a project