🦞
Resources

openclaw_channel_telegram

Manages the OpenClaw Telegram channel.

Manages the Telegram channel configuration including bot token, DM policy, streaming, and webhook settings.

Example Usage

resource "openclaw_channel_telegram" "main" {
  enabled       = true
  bot_token     = var.telegram_bot_token
  dm_policy     = "allowlist"
  allow_from    = ["tg:123456789"]
  stream_mode   = "partial"
  reply_to_mode = "first"
  history_limit = 50
}

Argument Reference

ArgumentTypeRequiredDefaultDescription
enabledBoolNo--Enable or disable the Telegram channel.
bot_tokenStringNo--Telegram bot token. Sensitive. Falls back to TELEGRAM_BOT_TOKEN env var.
dm_policyStringNo"pairing"DM policy: pairing, allowlist, open, disabled.
allow_fromList(String)No--Allowed Telegram user IDs (e.g. tg:123456789).
stream_modeStringNo--Stream preview: off, partial, block.
reply_to_modeStringNo--Reply-to behavior: off, first, all.
link_previewBoolNo--Enable link previews in outbound messages.
history_limitInt64No--Max chat history messages to fetch for context.
media_max_mbInt64No--Max inbound media size in MB.
webhook_urlStringNo--Webhook URL for Telegram webhook mode.

Attribute Reference

AttributeTypeDescription
idStringAlways "channel_telegram".

Import

terraform import openclaw_channel_telegram.main channel_telegram

On this page