Multi-platform API integration gateway built with FastAPI. Receive, transform, and relay data across Telegram, Slack, WhatsApp, e-mail, and arbitrary webhooks β all through a single HTTP service.
- Python 3.12+ β type-hinted throughout
- FastAPI β async web framework with auto-generated OpenAPI / Swagger docs
- httpx β async HTTP client for outbound API calls
- Pydantic v2 β request/response validation and settings management
- pydantic-settings β load config from environment variables /
.env
# 1. Clone & enter
cd api-integration-hub
# 2. (Optional) Create virtual environment
python -m venv .venv && source .venv/bin/activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Configure secrets
cp .env.example .env
# Edit .env with your API keys (see comments inside)
# 5. Run
uvicorn main:app --reloadOpen http://localhost:8000/docs for the Swagger UI β you can test every endpoint there.
docker compose up -d| Method | Path | Description |
|---|---|---|
| GET | /health |
Health check |
| POST | /webhook/receive |
Receive a generic webhook payload |
| POST | /webhook/forward |
Forward a payload to an external webhook |
| POST | /telegram/send |
Send a message via Telegram Bot API |
| POST | /slack/notify |
Send a notification to Slack |
| POST | /transform |
Map / transform data between formats |
Step 1 β Point Trello webhook to your instance:
POST /webhook/receive
Trello sends its card-update payload here. The endpoint echoes back what it got so you can inspect the shape.
Step 2 β Transform the data:
POST /transform
{
"template": {
"card": "{card_name}",
"list": "{list_after_name}",
"url": "{short_url}"
},
"data": {
"card_name": "Fix login bug",
"list_after_name": "In Progress",
"short_url": "https://trello.com/c/abc123"
}
}Response:
{
"result": {
"card": "Fix login bug",
"list": "In Progress",
"url": "https://trello.com/c/abc123"
}
}Step 3 β Forward the transformed data to Slack:
POST /slack/notify
{
"text": "Card moved: *Fix login bug* β _In Progress_\n<https://trello.com/c/abc123>",
"channel": "#engineering"
}| Module | Service | Requires |
|---|---|---|
telegram |
Telegram Bot API | TELEGRAM_BOT_TOKEN |
slack |
Slack Incoming Webhook | SLACK_WEBHOOK_URL |
whatsapp |
WhatsApp Cloud API | WHATSAPP_TOKEN, WHATSAPP_PHONE_ID |
email |
SMTP | SMTP_HOST, SMTP_USER, SMTP_PASS |
webhook |
Generic HTTP relay | β (any valid URL) |
See .env.example for the full list. Copy it to .env and fill in your credentials.
api-integration-hub/
βββ main.py # FastAPI app β all endpoints
βββ config.py # Pydantic Settings (reads .env)
βββ connectors/
β βββ __init__.py
β βββ telegram.py # Telegram Bot API wrapper
β βββ slack.py # Slack webhook sender
β βββ whatsapp.py # WhatsApp Cloud API wrapper
β βββ email.py # SMTP e-mail sender
β βββ webhook.py # Generic webhook forwarder
βββ requirements.txt
βββ .env.example
βββ .gitignore
βββ Dockerfile
βββ docker-compose.yml
MIT β use freely for personal or commercial projects.