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
| Argument | Type | Required | Description |
|---|---|---|---|
message_id | string | yes | ID of the message to delete |
thread_id | string | yes | Thread/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
| Argument | Type | Required | Description |
|---|---|---|---|
message_id | string | yes | ID of the message to edit (from messages.read_history). |
new_text | string | yes | Replacement text for the message. |
thread_id | string | yes | Thread 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
| Argument | Type | Required | Description |
|---|---|---|---|
dest_thread_id | string | no | Destination 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_name | string | no | Name 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_id | string | yes | ID of the message to forward |
source_thread_id | string | yes | Thread 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:
- Get thread_id from threads.list first, OR
- 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
| Argument | Type | Required | Description |
|---|---|---|---|
contact_name | string | no | Contact/thread name to search for (optional if thread_id provided). Example: 'Jane Smith', 'John Doe' |
include_outgoing | boolean | no | Include messages sent by you (default: true) (default True) |
limit | integer | no | Maximum number of messages to return (default: 10, max: 100) (default 10; min 1.0; max 100.0) |
offset | integer | no | Number of messages to skip (for pagination, default: 0) (min 0.0) |
text_contains | string | no | Filter: only return messages containing this text (case-insensitive substring match) |
thread_id | string | no | Thread 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
| Argument | Type | Required | Description |
|---|---|---|---|
attachments | array | no | Array 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). |
buttons | array | no | Inline 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. |
format | string | no | Message format (one of text, markdown, html; default text) |
from_account_id | integer | no | Which 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_name | string | no | Name of person to send to (e.g., 'Jane', 'John'). Tool will auto-resolve channel. Optional if thread_id provided. |
recipient_username | string | no | Telegram @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_id | string | no | ID of message to reply to (optional) |
silent | boolean | no | Send without notification |
text | string | no | Message text to send. Optional if attachments provided. (max 4096.0) |
thread_id | string | no | Target 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
| Argument | Type | Required | Description |
|---|---|---|---|
attachments | array | no | Array of integer file IDs to attach. |
bcc | array | no | Email addresses to BCC. OMIT to skip. |
cc | array | no | Email addresses to CC. OMIT to skip. |
recipient_email | string | no | Recipient email address (e.g. 'john@example.com'). Provide to start a new email thread; OMIT to reply in the current email thread. |
subject | string | no | Email subject line. Required for new emails; for replies it auto-generates 'Re: ...' when omitted. |
text | string | no | Email body. |