Creem Store Agent
AI-powered monitoring for your Creem store. Sends real-time Telegram alerts for sales, subscriptions, disputes, and refunds. Uses Claude AI to analyze churn events and autonomously recommend retention actions.
Commands
- -
/creem-status — Check store connection and webhook status - INLINECODE1 — Daily revenue summary (MRR, churn, new sales)
Features
- - Real-time alerts: Formatted Telegram notifications for all Creem events
- AI churn analysis: Claude Haiku analyzes cancellations and recommends retention actions
- Autonomous actions: Create retention discounts or pause subscriptions via inline buttons
- Event deduplication: Handles Creem webhook retries gracefully
- HMAC verification: Validates webhook signatures for security
Setup
- 1. Install: INLINECODE2
- Set environment variables (see
.env.example) - Expose webhook URL:
ngrok http 3000 (development) - Register webhook in Creem dashboard: INLINECODE5
Environment Variables
| Variable | Description |
|---|
| INLINECODE6 | Creem API key (test: creem_test_xxx) |
| INLINECODE8 |
Webhook signing secret from Creem dashboard |
|
TELEGRAM_BOT_TOKEN | Telegram bot token from @BotFather |
|
TELEGRAM_CHAT_ID | Telegram chat ID for notifications |
|
ANTHROPIC_API_KEY | Anthropic API key for Claude Haiku |
Creem商店代理
为您的Creem商店提供AI驱动的监控服务。实时发送销售、订阅、争议和退款的Telegram提醒。使用Claude AI分析客户流失事件,并自主推荐留存措施。
命令
- - /creem-status — 检查商店连接和Webhook状态
- /creem-report — 每日收入摘要(MRR、流失率、新增销售额)
功能特性
- - 实时提醒:所有Creem事件的格式化Telegram通知
- AI流失分析:Claude Haiku分析取消原因并推荐留存措施
- 自主操作:通过内联按钮创建留存折扣或暂停订阅
- 事件去重:优雅处理Creem Webhook重试
- HMAC验证:验证Webhook签名以确保安全
设置步骤
- 1. 安装:clawhub install creem-store-agent
- 设置环境变量(参见.env.example)
- 暴露Webhook URL:ngrok http 3000(开发环境)
- 在Creem后台注册Webhook:https://your-ngrok-url.ngrok.io/webhook/creem
环境变量
| 变量 | 说明 |
|---|
| CREEMAPIKEY | Creem API密钥(测试:creemtestxxx) |
| CREEMWEBHOOKSECRET |
Creem后台的Webhook签名密钥 |
| TELEGRAM
BOTTOKEN | 来自@BotFather的Telegram机器人令牌 |
| TELEGRAM
CHATID | 用于接收通知的Telegram聊天ID |
| ANTHROPIC
APIKEY | 用于Claude Haiku的Anthropic API密钥 |