Skip to main content

messages

messages.delete

Delete Message

Effects: delete, write

Delete a message from a thread. Supports Telegram, WhatsApp, and other connected channels. Note: Some channels have time limits on message deletion.

Arguments

ArgumentTypeRequiredDescription
message_idstringyesID of the message to delete
thread_idstringyesThread/channel ID containing the message

messages.edit

Edit Message

Effects: write

Edit the text of a message you already sent, in place. Supported on Telegram, WhatsApp, LiveChat, Max.ru, LINE, WeChat and similar channels; NOT supported on Gmail, Instagram, or LinkedIn (their platforms forbid editing) — those return an explicit error. Note: channels impose their own limits (own messages only, edit time windows such as ~48h on Telegram / ~15min on WhatsApp).

Get the message_id from messages.read_history (each row's id).

Arguments

ArgumentTypeRequiredDescription
message_idstringyesID of the message to edit (from messages.read_history).
new_textstringyesReplacement text for the message.
thread_idstringyesThread ID containing the message (numeric DB id or channel_ref like 'telegram:-100123').

messages.forward

Forward Message

Effects: send, write

Forward a message from one thread to another. Supports native Telegram forwarding (preserves original sender attribution) and text-based forwarding for cross-channel scenarios.

Arguments

ArgumentTypeRequiredDescription
dest_thread_idstringnoDestination thread to forward into. Provide at least one of dest_thread_id or recipient_name. To forward into the active conversation, pass the current thread_id. (If both are provided, dest_thread_id wins and recipient_name is ignored.)
recipient_namestringnoName of person to forward to (channel auto-resolved). Provide at least one of dest_thread_id or recipient_name. Use only when forwarding to a different contact than the current conversation.
source_message_idstringyesID of the message to forward
source_thread_idstringyesThread containing the message to forward (e.g., 'telegram:123456' or numeric DB ID)

messages.read_history

Read Message History

Effects: read

Read messages from a conversation thread. Use text_contains to find specific messages by content. Returns the most recent messages, including sender info and timestamps.

Voice calls: each row carries a meta object with allowlisted keys (event_type ∈ 'call_started'|'call_ended'|null, source ∈ 'voice_transcript'|null, call_id, speaker_display_name, duration_seconds, outcome, direction) plus per-message channel. To find calls without scanning every row, use calls.list_history instead.

Usage:

  1. Get thread_id from threads.list first, OR
  2. Use contact_name to auto-resolve thread_id

Examples:

  • User: 'show me messages from chat with [contact]' → read_history(contact_name='[contact]', limit=10)
  • User: 'last 5 messages from thread 571' → read_history(thread_id=571, limit=5)

Arguments

ArgumentTypeRequiredDescription
contact_namestringnoContact/thread name to search for (optional if thread_id provided). Example: 'Jane Smith', 'John Doe'
include_outgoingbooleannoInclude messages sent by you (default: true) (default True)
limitintegernoMaximum number of messages to return (default: 10, max: 100) (default 10; min 1.0; max 100.0)
offsetintegernoNumber of messages to skip (for pagination, default: 0) (min 0.0)
text_containsstringnoFilter: only return messages containing this text (case-insensitive substring match)
thread_idstringnoThread ID to read messages from (e.g., '571' or 'telegram:571'). Optional if contact_name provided.

messages.send

Send Message

Effects: send, write

Send a message to a thread, channel, or contact. Supports Telegram, Email, LinkedIn, and other connected channels. For LinkedIn posts (comment_thread kind), this posts a comment on the post. Can automatically resolve recipients and channels when not specified. Can send files/images/documents as attachments — pass attachments=[file_id, ...] with integer file IDs obtained from collections.list_files, search.files, or files.search. text is optional when attachments are provided.

Arguments

ArgumentTypeRequiredDescription
attachmentsarraynoArray of integer file IDs to send as attachments (images, documents, any files). Get file IDs from collections.list_files (field file_id), search.files (field file_id), or files.search. Example: [302237]. The file must already exist in the workspace (status=ready) — no separate upload step needed. When attachments are provided, text becomes optional (a caption can be included alongside).
buttonsarraynoInline reply buttons shown under the message, one per row (max 10). Each item is {"label": "<visible button text>"} plus exactly one target: "value" (a string sent back as a normal incoming message when tapped, defaults to the label, max 64 bytes), "url" (opens a link) or "web_app" (opens an https page as a Telegram Mini App). Only on channels that support buttons (Telegram bot accounts); can accompany at most one attachment, and when the text is too long for a media caption the buttons arrive with the text as a second message.
formatstringnoMessage format (one of text, markdown, html; default text)
from_account_idintegernoWhich of the workspace's accounts on this channel SENDS the message, i.e. the number or handle the recipient sees. Only meaningful when starting a NEW conversation — an existing thread already belongs to an account and that one is used. OMIT and the platform picks the most recently active account, which is a coin flip in a workspace with several numbers: pass it whenever one of them must not be used to open conversations (a personal line, or one under a spam restriction). An account that is not active in this workspace is refused, never silently swapped.
recipient_namestringnoName of person to send to (e.g., 'Jane', 'John'). Tool will auto-resolve channel. Optional if thread_id provided.
recipient_usernamestringnoTelegram @username to message (e.g. '@some_username'). Use this for a Telegram user NOT yet in contacts — it resolves the handle, adds the contact, and creates the thread. Telegram only; for existing contacts prefer thread_id or recipient_name.
reply_to_message_idstringnoID of message to reply to (optional)
silentbooleannoSend without notification
textstringnoMessage text to send. Optional if attachments provided. (max 4096.0)
thread_idstringnoTarget thread. OMIT to reply in the same chat you received the triggering message from — the backend defaults to the current thread. Pass an explicit value ONLY to reply in a DIFFERENT thread, and only use: (a) a numeric DB thread id from search.threads, or (b) a channel_ref like 'telegram:-12345'. NEVER use a chat-type word (dm, group, channel, livechat) — those are category labels from the SITUATION block, not ids.

messages.send_email

Send Email

Effects: send, write

Compose and send an email — with subject, CC/BCC, and attachments. Use for email; for chat messages (Telegram/WhatsApp/livechat) use messages.send instead.

Arguments

ArgumentTypeRequiredDescription
attachmentsarraynoArray of integer file IDs to attach.
bccarraynoEmail addresses to BCC. OMIT to skip.
ccarraynoEmail addresses to CC. OMIT to skip.
recipient_emailstringnoRecipient email address (e.g. 'john@example.com'). Provide to start a new email thread; OMIT to reply in the current email thread.
subjectstringnoEmail subject line. Required for new emails; for replies it auto-generates 'Re: ...' when omitted.
textstringnoEmail body.