Community生產力與協作github.com

publora/telegram-post

當使用者想要透過 Publora 使用機器人發布或排程貼文到 Telegram 頻道或群組時使用。涵蓋 Telegram Markdown、靜默傳送、連結預覽與轉發保護。機器人 API 將媒體說明限制在 1,024 字元,影片限制在 50 MB。不適用於其他平台(每個平台都有各自的技能)。

telegram-post 是什麼?

這個 AI 代理技能透過 Publora MCP 伺服器,讓使用者能夠建立並排程貼文至 Telegram 頻道與群組。它支援豐富的 Markdown 格式、圖片、影片,以及多種傳送選項,例如靜默傳送、停用連結預覽與內容保護。此技能支援多種 AI 代理平台,包括 Claude Code、Claude Desktop、Cursor、Codex、OpenClaw 以及 claude.ai 連接器。它提供 MCP 工具(如 create_post、get_upload_url、complete_media)以及 REST API 備援方案。使用前需先建立 Publora 帳戶、建立 Telegram 機器人並將其新增為頻道管理員,然後將 MCP 伺服器連接到代理。關鍵限制包括 Bot API 媒體說明最多 1,024 字元、影片最大 50 MB,以及機器人必須擁有管理員權限。此技能也提供詳細的疑難排解指南與最佳實務,協助使用者最佳化其 Telegram 發文。

相容平台✓Claude Code✓Codex CLI✓Cursor
npx skills add https://github.com/publora/skills/tree/main/skills/telegram-post

Installed? Explore more 生產力與協作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Telegram Post

使用 Publora MCP 伺服器建立並排程貼文至 Telegram 頻道與群組。支援豐富的 Markdown 格式、圖片、影片,以及多種傳送選項。

先決條件

方案: 適用於免費的 Starter 方案。目前的限制與定價:publora.com/pricing。

開始使用

  1. 建立帳戶 於 publora.com/register(免費)
  2. 建立 Telegram 機器人:
    • 在 Telegram 上傳送訊息給 @BotFather
    • 傳送 /newbot 並依照指示操作
    • 儲存機器人 token
  3. 將機器人新增至您的頻道:
    • 將機器人以管理員身分新增至您的頻道/群組
    • 授予 can_post_messages 權限
  4. 在 Publora 中連線 於 Dashboard 使用機器人 token 與頻道名稱
  5. 取得 API 金鑰 於 app.publora.com/dashboard/api
  6. 將您的代理連線至 MCP 伺服器,伺服器位址為 https://mcp.publora.com,使用 Authorization: Bearer sk_YOUR_API_KEY 進行驗證。在 Claude Code 中:
claude mcp add publora --transport http https://mcp.publora.com \
  --header "Authorization: Bearer sk_YOUR_API_KEY"

Claude Desktop、Cursor、Codex、OpenClaw 以及 claude.ai 連接器各自需要不同的設定檔或流程:請參閱用戶端設定以取得確切路徑與程式碼片段。

REST API 備援方案

如果 MCP 伺服器無法使用或回傳錯誤,請直接使用 REST API:

基礎 URL: https://api.publora.com/api/v1

驗證方式: 使用 x-publora-key 標頭(非 Authorization: Bearer):

# 取得您已連線的平台
curl -X GET "https://api.publora.com/api/v1/platform-connections" \
  -H "x-publora-key: sk_your_api_key"

# 建立貼文
curl -X POST "https://api.publora.com/api/v1/create-post" \
  -H "x-publora-key: sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "platforms": ["telegram-1001234567890"],
    "content": "*Announcement*\n\nYour message here",
    "scheduledTime": "2026-03-25T10:00:00Z"
  }'

平台 ID 格式: telegram-{chat_id},其中 {chat_id} 是來自 /platform-connections 的頻道/群組數值 ID。

範例 ID:telegram-1001234567890、telegram--1002345678901

📖 完整 API 文件: docs.publora.com

平台限制(Bot API)

功能限制
文字訊息4,096 字元
媒體說明1,024 字元(關鍵限制!)
圖片最大 10 MB,每個媒體群組 10 張
圖片格式JPEG、PNG、GIF、BMP、WebP
影片大小最大 50 MB(非 4 GB——那是給一般使用者!)
影片格式MP4、MOV、AVI、MKV、WebM
速率限制全域 30 則訊息/秒,每個群組 20 則訊息/分鐘

關鍵: Bot API 的限制遠低於一般 Telegram 使用者。超過 50 MB 的影片和超過 1,024 字元的說明將會失敗。

Markdown 格式

Telegram 使用自己的 Markdown 風味,使用單一星號表示粗體:

語法結果
*bold*粗體
_italic_斜體
`code`行內程式碼
code 程式碼區塊
[text](url)超連結
> text引言

注意: 這與標準 Markdown 不同,標準 Markdown 使用 **雙星號** 表示粗體。

可用工具

create_post

建立新的 Telegram 貼文。

參數:

  • platforms:包含您的 Telegram 連線 ID 的陣列(例如 ["telegram-1001234567890"])
  • content:訊息文字(支援 Markdown)
  • scheduledTime:ISO 8601 UTC 日期時間。可選:省略則貼文會建立為草稿。設定未來時間則進行排程。如果時間是五分鐘或更早的過去時間,將回傳 SCHEDULED_TIME_IN_PAST 錯誤,因此若要立即發布,請使用目前時間再加一分鐘。
  • mediaUrls:最多 10 個公開的 https 圖片或影片 URL。Publora 會在伺服器端下載它們,並在驗證之前附加它們,因此媒體和排程可以在一次呼叫中完成。這是草稿後再使用 get_upload_url 再 complete_media 流程的一次性替代方案。擷取速率限制為每小時 60 個 URL。

get_upload_url

取得用於媒體上傳的預先簽署 URL。

complete_media

在 presigned PUT 成功後,完成透過 get_upload_url 上傳的檔案。為可選步驟,因為排程也會完成待處理的媒體,但提前呼叫可以在發布前提早顯示格式和探測錯誤。對於使用 mediaUrls 附加的媒體則不需要。

參數:

  • mediaId:get_upload_url 回傳的 ID

list_connections

列出您已連線的帳戶及其平台 ID。請先呼叫此工具並逐字複製 ID;這些 ID 永遠無法猜測。

list_posts / get_post / update_post / delete_post

管理已排程和草稿的貼文。update_post 也會修補草稿或已排程貼文的 content 和 platforms,因此修正錯字或重新定位目標不再需要刪除並重新建立。delete_media 和 prune_media_reference 可清理已上傳的檔案。

貼文選項(透過 REST API)

可透過 REST API platformSettings.telegram 使用的 Telegram 特定選項:

選項說明
disableNotification靜默傳送(無聲音)
disableWebPagePreview無連結預覽卡片
protectContent防止轉發/儲存

說明置於媒體上方是不可設定的:showCaptionAboveMedia 不是接受的鍵,傳送它會回傳 400 PLATFORM_SETTING_UNKNOWN。

注意:platformSettings 可被 MCP 的 create_post 和 update_post 工具以及 REST API 接受。其結構是嚴格的:錯誤的平台或鍵會因驗證錯誤而被拒絕,而不是被靜默忽略。

範例

簡單頻道貼文

將此貼文傳送到我的 Telegram 頻道:
"*Product Update v2.5*

我們已推出以下改進:
- _Faster API response times_(平均 45 毫秒)
- 新的 `batch` 端點用於批次操作

[閱讀變更日誌](https://example.com/changelog)"

格式化公告

建立一個具有此格式的 Telegram 貼文:
"*Important Update*

我們的新功能將於明天上午 10 點 UTC 推出。

_What's new:_
- Feature A 改進
- Feature B 發布

[閱讀完整公告](https://example.com/update)"

附圖片的貼文

將此圖片連同說明傳送到我的 Telegram 頻道:
"*New Dashboard Preview*

這是我們重新設計的分析儀表板的搶先預覽。"

重要: 在發布帶有媒體的貼文時,說明必須少於 1,024 字元。

排程貼文

為明天莫斯科時間上午 8 點排程此貼文:
"*Good morning!* 這是您的每日市場摘要..."

重要限制

  1. 說明限制為 1,024 字元:使用媒體(圖片/影片)發布時,文字會以說明形式傳送,限制為 1,024 字元。純文字訊息允許 4,096 字元。

  2. 影片最大 50 MB:Bot API 將影片限制在 50 MB(不像一般使用者可達 4 GB)。大型影片將會失敗。

  3. 機器人必須是管理員:您的機器人需要管理員角色並具有 can_post_messages 權限。此權限會在連線時驗證。

  4. 不可混合媒體:單一貼文不能同時包含圖片和影片。

  5. 說明超出:如果說明在媒體貼文中超過 1,024 字元,它會以單獨的回覆訊息傳送,而不是被截斷。

最佳實務

內容

  1. 使用格式:粗體標題、斜體強調可提高可讀性
  2. 連結預覽:非常適合文章;對於更簡潔的公告則停用
  3. 表情符號使用:在 Telegram 上常見且受歡迎
  4. 貼文長度:純文字訊息沒有長度懲罰

時機

  • 全球觀眾:Telegram 使用者遍布全球;請考慮時區貼文
  • 最佳時間:目標區域的上午 8-10 點、中午 12-下午 2 點、晚上 7-9 點
  • 發布頻率:頻道可以更頻繁地發布(5-10 篇/天)

互動

  • 在頻道設定中啟用留言功能以進行討論
  • 使用投票來提高互動率
  • 釘選重要公告

疑難排解

錯誤原因解決方案
"Bot not admin"機器人缺少管理員權限將機器人以管理員身分新增,並授予 can_post_messages 權限
"Channel not found"頻道名稱/ID 錯誤驗證 @channelname 或數值聊天 ID
MEDIA_CAPTION_TOO_LONG說明 > 1,024 字元縮短說明或使用純文字貼文
"Bad Request: file is too big"檔案 > 50 MB將影片/圖片壓縮至 50 MB 以下
"Mixed media not supported"同一貼文中包含圖片與影片每個貼文僅使用一種媒體類型

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

publora/bluesky-post

Use when the user wants to post or schedule to Bluesky through Publora. Handles the 300-character cap, auto-detected hashtags and links, up to 4 images, and videos. Alt text cannot be set through the API. Needs a Bluesky app password, never the main password. Not for Mastodon (use social-post).

publora/instagram-post

Use when the user wants to post or schedule to Instagram through Publora: a single image, a 2-10 image carousel, a Reel or a Story. Requires a Business account and an image or video; text-only posts are rejected by the API. Not for Threads (use threads-post).

publora/linkedin-analytics

Analyze LinkedIn performance and manage engagement through Publora. Use when the user asks how a LinkedIn post or account performed (impressions, reach, reactions, comments, reshares, follower growth) or wants to react, comment, reshare or resolve an @mention. Statistics run over the REST API, engagement over MCP tools. Not for creating posts (use linkedin-post).

publora/linkedin-post

Use when the user wants to publish or schedule a LinkedIn post through Publora: text, a multi-image grid, a video, a PDF document, or @mentions. Not for analytics, reactions, comments or reshares (use linkedin-analytics), and not for other platforms.

publora/social-post

Use when the user wants to post or schedule to YouTube, a Facebook Page or Mastodon through Publora. YouTube needs a video on every post, Facebook publishes to Pages only, Mastodon caps at 500 characters. Not for the platforms that have their own skill.

publora/threads-post

Create and schedule Threads posts with image carousels and reply control via Publora MCP. Use when the user wants to post to Meta's Threads. Multi-part threading is currently disabled by the platform, so long content stays a single post. Not for Instagram (use instagram-post) or X threads (use x-post).

publora/tiktok-post

Use when the user wants to upload or schedule a TikTok video through Publora, with privacy, comment, duet, stitch and commercial-disclosure settings. Video runs 3 seconds to 10 minutes at 23+ FPS; carousels take up to 35 images. Unaudited apps can publish private videos only. Not for Reels (use instagram-post).

publora/x-post

Use when the user wants to post or schedule to X (Twitter) through Publora, including threads auto-split past 280 characters, up to 4 images, or a video up to 140 seconds. X needs a paid Publora plan. Not for Threads or Bluesky (each has its own skill).

相關技能