Skip to content

Telegram Bot Notifications

Get real-time campaign alerts in Telegram using the GhostFlow API.

  1. Create a Telegram bot via @BotFather
  2. Get your chat ID via @userinfobot
  3. Deploy this script (Node.js):
import { Telegraf } from 'telegraf';
const bot = new Telegraf(process.env.TELEGRAM_BOT_TOKEN!);
const GF_API_KEY = process.env.GF_API_KEY!;
const CHAT_ID = process.env.TELEGRAM_CHAT_ID!;
async function checkStats() {
const res = await fetch('https://devcore.getghostflow.io/api/v1/reports/dashboard', {
headers: { 'Authorization': `Bearer ${GF_API_KEY}` },
});
const data = await res.json();
const message = `📊 Daily Summary\n` +
`Clicks: ${data.clicks}\n` +
`Conversions: ${data.conversions}\n` +
`Revenue: $${data.revenue}\n` +
`ROI: ${data.roi}%`;
await bot.telegram.sendMessage(CHAT_ID, message);
}
// Run every hour
setInterval(checkStats, 3600000);
bot.launch();

Your API key needs: read:stats