返回顶部
t

telegram-businessTelegram商业机器人

Telegram bot for business automation — lead capture forms, inline keyboard menus, FAQ matching, appointment booking flows, and payment integration. Use for building customer-facing Telegram bots, community management, and lead generation.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
334
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

telegram-business

Telegram 商业机器人

在 Telegram 上构建业务自动化——包括潜在客户获取表单、预约预订、常见问题解答机器人、支付和社区管理。

快速开始

bash
export TELEGRAMBOTTOKEN=123456:ABC-DEF...

发送消息

python3 {baseDir}/scripts/telegrambusiness.py send-message id> 来自您的商业机器人的问候!

发送内联键盘

python3 {baseDir}/scripts/telegrambusiness.py send-menu id> 我能如何帮助您? [{text:📅 预约,callbackdata:book},{text:❓ 常见问题,callbackdata:faq},{text:💬 联系销售,callback_data:sales}]

开始潜在客户获取

python3 {baseDir}/scripts/telegrambusiness.py send-lead-form id>

机器人设置

1. 通过 @BotFather 创建机器人

  1. 1. 打开 Telegram,搜索 @BotFather
  2. 发送 /newbot
  3. 选择名称和用户名(必须以 bot 结尾)
  4. 复制令牌 → 设置为 TELEGRAMBOTTOKEN

2. 配置机器人

/setdescription - 机器人资料上显示的业务描述
/setabouttext - 简短介绍文本
/setuserpic - 机器人头像
/setcommands - 设置命令菜单:
start - 开始使用
book - 预约
faq - 常见问题解答
contact - 联系我们
help - 获取帮助

3. Webhook 设置

bash

设置 webhook(使用您的服务器 URL)

python3 {baseDir}/scripts/telegram_business.py set-webhook https://your-domain.com/webhook/telegram

获取 webhook 信息

python3 {baseDir}/scripts/telegram_business.py get-webhook

删除 webhook(切换到轮询模式)

python3 {baseDir}/scripts/telegram_business.py delete-webhook

可用命令

消息发送

bash

发送文本

python3 {baseDir}/scripts/telegrambusiness.py send-message id> 您好!

使用 HTML 格式发送

python3 {baseDir}/scripts/telegrambusiness.py send-message id> 粗体斜体 --html

使用 Markdown 格式发送

python3 {baseDir}/scripts/telegrambusiness.py send-message id> 粗体斜体 --markdown

回复消息

python3 {baseDir}/scripts/telegrambusiness.py send-message id> 收到! --reply-to

内联键盘

bash

简单菜单(每行 2 个按钮)

python3 {baseDir}/scripts/telegrambusiness.py send-menu id> 选择一个选项: [ {text:选项 A,callbackdata:opta}, {text:选项 B,callbackdata:optb}, {text:选项 C,callbackdata:optc} ]

URL 按钮

python3 {baseDir}/scripts/telegrambusiness.py send-menu id> 访问我们: [ {text:🌐 网站,url:https://example.com}, {text:📸 Instagram,url:https://instagram.com/example} ]

回复回调查询(确认按钮按下)

python3 {baseDir}/scripts/telegrambusiness.py answer-callback query_id> 处理中...

编辑消息(按钮按下后更新)

python3 {baseDir}/scripts/telegrambusiness.py edit-message id> 已更新的文本!

潜在客户获取

bash

发送潜在客户获取表单(多步骤内联流程)

python3 {baseDir}/scripts/telegrambusiness.py send-lead-form id>

处理潜在客户数据(通过对话收集后)

python3 {baseDir}/scripts/telegrambusiness.py process-lead {chatid:123,name:张三,email:zhangsan@example.com,phone:+15551234567,interest:AI 自动化,source:telegram}

常见问题解答系统

bash

匹配问题到常见问题解答

python3 {baseDir}/scripts/telegram_business.py faq-match 你们的营业时间是?

发送常见问题解答菜单

python3 {baseDir}/scripts/telegrambusiness.py send-faq-menu id>

媒体

bash

发送照片

python3 {baseDir}/scripts/telegrambusiness.py send-photo id> https://example.com/image.jpg 此处为说明文字

发送文档

python3 {baseDir}/scripts/telegrambusiness.py send-document id> /path/to/file.pdf

发送名片

python3 {baseDir}/scripts/telegrambusiness.py send-contact id> +15551234567 张三 李

潜在客户获取流程

机器人引导用户完成多步骤表单:

  1. 1. 开始 → 带菜单按钮的欢迎消息
  2. 获取报价 → 询问姓名
  3. 用户发送姓名 → 询问邮箱
  4. 用户发送邮箱 → 询问电话(可选)
  5. 用户发送电话 → 询问服务兴趣(按钮)
  6. 用户选择服务 → 确认 + 感谢
  7. 潜在客户数据以 JSON 格式输出,用于 CRM 集成

与 CRM 集成

bash

从 Telegram 捕获潜在客户,评分,添加到 GHL

LEAD={name:张三,email:zhangsan@x.com,phone:+1555...,source:telegram} SCORE=$(python3 ../lead-gen-pipeline/{baseDir}/scripts/lead_scorer.py $LEAD) python3 ../ghl-crm/{baseDir}/scripts/ghl_api.py contacts create $LEAD

常见问题解答自动化

在脚本的 FAQ_DATABASE 中定义您的常见问题解答:

python
FAQ_DATABASE = [
{q: 你们的营业时间是?, a: 我们周一至周五上午 9 点至下午 6 点(美国东部时间)营业。, keywords: [时间, 营业, 工作时间]},
{q: 你们在哪里?, a: 纽约市主街 123 号, keywords: [位置, 地址, 哪里]},
{q: 费用是多少?, a: 套餐起价为每月 99 美元。回复定价获取详情。, keywords: [费用, 价格, 定价, 多少钱]},
]

常见问题解答匹配器使用关键词匹配 + 模糊相似度。如需 AI 驱动的匹配,可通过 LLM 进行管道处理。

支付集成

Telegram 通过支付提供商(Stripe 等)支持原生支付:

bash

发送发票


python3 {baseDir}/scripts/telegrambusiness.py send-invoice id> {
title: 咨询费,
description: 1 小时 AI 自动化咨询,
payload: consultation_001,
providertoken: STRIPETOKEN,
currency: USD,
prices: [{label: 咨询, amount: 9900}]
}

注意: amount 以最小货币单位表示(美元为美分)。99.00 美元 = 9900。

群组管理

bash

获取聊天信息


python3 {baseDir}/scripts/telegrambusiness.py get-chat id>

获取成员数量

python3 {baseDir}/scripts/telegrambusiness.py get-member-count id>

置顶消息

python3 {baseDir}/scripts/telegrambusiness.py pin-message id>

设置聊天描述

python3 {baseDir}/scripts/telegrambusiness.py set-description id> 欢迎来到我们的社区!

Webhook 负载处理

使用 webhook 时,传入的更新如下所示:

消息:
json
{updateid: 123, message: {chat: {id: 456}, from: {id: 789, firstname: 张三}, text: /start}}

回调(按钮按下):
json
{updateid: 124, callbackquery: {id: abc, data: book, message: {chat: {id: 456}}}}

使用以下命令解析:
bash
python3 {baseDir}/scripts/telegram_business.py parse-update

致谢

由 [M. Abidi](https://www.linked

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 telegram-business-1776198436 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 telegram-business-1776198436 技能

通过命令行安装

skillhub install telegram-business-1776198436

下载

⬇ 下载 telegram-business v1.0.0(免费)

文件大小: 3.46 KB | 发布时间: 2026-4-15 13:56

v1.0.0 最新 2026-4-15 13:56
Initial release of telegram-business.
- Telegram bot for business automation: lead capture forms, inline keyboard menus, FAQ matching, appointment booking, and payment integration.
- Includes scripts for messaging, media, contact cards, group/community management, and webhook setup.
- Multi-step lead capture flow with output for CRM integration.
- FAQ system with keyword and fuzzy matching.
- Support for native Telegram payment providers (e.g., Stripe).
- Comprehensive setup and usage instructions in documentation.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large