Tools

Email Manager

Read, send, reply to, and organize messages in your inbox.

Introduction

The Email Manager tool operates on your IMAP mailbox: list messages, read them, send new ones, reply to existing threads, move messages between folders, and apply labels. It reuses the IMAP and SMTP credentials of the Email connector.

!NOTE The Email Manager tool is not the same as the Email connector. The connector lets users message the bot via email. The tool lets the bot read and write your inbox. They can be enabled independently and only share the SMTP/IMAP config.

Reading the Inbox

ParameterDescription
operationinbox
folderFolder name (default INBOX)
searchPlain text search across subject, sender, and body. Don't use Gmail-style operators like from: or subject: — just words.
from_filterFilter by sender (partial match)
limitMax messages to return (default 10, max 20)

Returns a JSON array of message summaries: UID, subject, sender, date, read/flagged status, attachment count, size.

To read a single message in full:

ParameterDescription
operationread
uidMessage UID
folderFolder name (default INBOX)

The body is returned as plain text, falling back to a stripped HTML body, truncated at 50 KB.

Sending and Replying

To send a new email:

ParameterRequiredDescription
operationYessend
toYesArray of recipient email addresses
subjectYesSubject line
bodyYesBody text
ccNoCC recipients
bccNoBCC recipients
attachmentsNoArray of {disk, path, filename, mime_type} objects

To reply to an existing message:

ParameterRequiredDescription
operationYesreply
uidYesThe UID of the message being replied to
bodyYesReply body
toNoOverride the reply-to address
attachmentsNoSame shape as send

Replies set In-Reply-To and References automatically so they thread correctly in mail clients. The original message is marked as answered.

Folders and Labels

OperationParametersNotes
moveuid, folder (destination), optional source_folderMoves the message to another folder
labeluid, folder (label), optional source_folderCopies the message to another folder, leaving it in place
foldersLists every folder in the mailbox
create_folderfolderCreates a new folder
delete_folderfolder (or folders)Requires confirmation. Deletes one or more folders.

Marking Read and Unread

OperationParameters
mark_readuid, optional folder
mark_unreaduid, optional folder

Deleting Messages

ParameterDescription
operationdelete
uid or uidsSingle UID or array of UIDs
folderFolder name (default INBOX)

Delete requires confirmation. The user is prompted in chat first, and the deletion is permanent (the message is expunged, not just flagged).

Copyright © 2026