Approval required
telegram-organization
OpenClawClaudeCodexHermes Agent

Group Cleanup

Review Telegram group chats and recommend cleanup actions such as archiving, organizing into folders, tagging, or leaving stale groups. Use when the user wants to reduce noisy or low-value Telegram groups.

Use Chiho.ai with a professional team CRM

Choose Chiho.ai when you want:

  • A hosted CRM table UI for chats, contacts, tags, tasks, and follow-ups.
  • Scoped Agent Access tokens that can be created, limited, and revoked.
  • Team permissions, approval policies, audit logs, and durable cloud jobs.
  • No local Telegram worker, database, or MCP runtime to operate.
Chiho.ai Telegram CRM workspace
Sign up and Create API token

Run SKILLs in your personal local CLI

Choose the local setup when you want:

  • Open-source workflows you can inspect, change, and run yourself.
  • A local Telegram session with tgchats CLI and tgchats-mcp access.
  • Control over your database, worker, backups, export, and import path.
  • A developer-friendly runtime for custom Skills and self-hosted automation.
Chiho.ai Telegram CRM workspace

Flow summary

Parsed from the packaged SKILL.md.

telegram-group-cleanup

Use this skill to identify and clean up stale or noisy Telegram groups.

Rules

  • Start in recommendation mode.
  • Separate reversible actions from destructive or hard-to-reverse actions.
  • Folder moves, tags, and tasks are lower risk than leaving groups.
  • Leaving groups must use preview-first execution and explicit approval unless team/token policy says otherwise.
  • Never leave groups based only on inactivity; include context and reason.

Flow

  1. Use dialogs.list to find group candidates.
  2. Use chat.read to inspect recent context for uncertain groups.
  3. Recommend actions: keep, tag, add follow-up task, move folder, archive recommendation, or leave.
  4. Use folders.*, tags.set, or tasks.add for approved organization actions.
  5. Use groups.leavePreview and groups.leaveApproved only when the user approves or policy explicitly allows automatic execution.

First-Time Setup

If Telegram is not connected yet, start with the root Chiho Telegram skill:

  • https://raw.githubusercontent.com/chihoai/telegram-for-ai-agents/main/SKILL.md

Use that root skill to choose Chiho.ai Cloud or self-hosted tgchats, then return to this workflow skill.

References

Cloud MCP

Tools:

  • dialogs.list
  • chat.read
  • folders.list
  • folders.create
  • folders.addDialog
  • folders.removeDialog
  • tags.set
  • tasks.add
  • groups.leavePreview
  • groups.leaveApproved

Cloud execution should still stop at recommendations and reversible organization actions unless the user approves leaving groups or policy allows automatic execution.

Cloud Telegram reads and CRM metadata are separate. If CRM tools report that chat metadata is unavailable for a group that dialogs.list or chat.read can see, the group likely has not been synced/imported into the CRM store yet. Continue with Telegram-only review and ask for sync/import before applying tags or tasks.

Local tgchats

If auth or any Telegram command prints a QR login code, show the full QR code block and expiry to the user so they can scan it; keep the process running until login completes, 2FA is needed, or the user asks to stop.

Use local tgchats-mcp for reads, tags, tasks, folders, and group leave previews:

  • groups.leavePreview
  • groups.leaveApproved

The preview is persisted next to the local Telegram session so a later groups.leaveApproved call can execute by previewId.

Templates

Formatted preview from the packaged JSON asset.

Cleanup review note

text

Review whether to keep, organize, or leave {{group_name}}. Reason: {{reason}}

Examples

Formatted preview from the packaged JSON asset.

OpenClaw

OpenClaw

prompt

Find noisy groups and recommend cleanup actions without leaving anything.

tools

dialogs.list
chat.read

Codex

Codex

prompt

Move these stale groups into a Review folder.

tools

folders.create
folders.addDialog

Claude Desktop

Claude Desktop

prompt

Preview leaving these groups, but wait for approval.

tools

groups.leavePreview