Approval required
telegram-automation
OpenClawClaudeCodexHermes Agent

Conditional Replies

Create, dry-run, or execute conditional Telegram reply workflows. Use when the user wants automatic or semi-automatic replies based on chat content, tags, folders, or follow-up state.

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-conditional-replies

Use this skill for rule-driven reply workflows.

Rules

  • Start with dry-run or recommendation mode unless the user explicitly asks to enable execution.
  • Prefer CRM tasks or draft replies before automatic sends.
  • Read recent history before proposing reply conditions.
  • Use explicit enablement and approval for any rule that sends Telegram messages.
  • Do not create broad always-on reply rules without a narrow condition and audit path.

Flow

  1. Inspect existing rules with rules.list.
  2. Read target chats with dialogs.list and chat.read when needed.
  3. Add or adjust rule instructions with rules.add if the user requests persistence.
  4. Dry-run the rule with rules.dryRun.
  5. Inspect outcomes with rules.log.
  6. Run the rule with rules.run only after the dry-run is acceptable.
  7. For actual replies, prefer preview-first outbox.* or single-recipient message.sendDraft according to token/team policy.

Execution Boundary

Until rules.enable, rules.disable, and rules.update exist, treat persistent conditional replies as conservative rule creation plus explicit dry-run/run/log review.

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

Read/CRM tools:

  • rules.list
  • rules.add
  • rules.dryRun
  • rules.run
  • rules.log
  • dialogs.list
  • chat.read

Write tools for message execution:

  • message.sendDraft
  • outbox.preview
  • outbox.sendApproved

Use write tools only after the rule result is understandable and approved by policy.

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 rule and read tools. Use the same Cloud tool names for message execution:

  • message.sendDraft
  • outbox.preview
  • outbox.sendApproved

Always call rules.dryRun before rules.run for conditional reply workflows.

Templates

Formatted preview from the packaged JSON asset.

Availability check

text

Hi {{first_name}}, thanks for the note. I can take a look and get back to you by {{date}}.

Handoff reply

text

Hi {{first_name}}, looping in {{colleague_name}} who can help with {{topic}}.

Examples

Formatted preview from the packaged JSON asset.

OpenClaw

OpenClaw

prompt

Create a rule that drafts replies for chats tagged customer when they ask about pricing.

tools

rules.list
chat.read
rules.add

Codex

Codex

prompt

Run the reply rules and show me what would happen before sending anything.

tools

rules.run
rules.log

Claude Desktop

Claude Desktop

prompt

Draft a conditional reply for this chat, but do not send it yet.

tools

chat.read
message.sendDraft