Email: List messages
email_list_messagesList email messages from the user's connected Gmail, Microsoft/Outlook OR generic IMAP mailbox. This is especially useful for IMAP mailboxes not covered by native agent connectors, and for cross-channel workflows that combine email context with LinkedIn/WhatsApp/Instagram. Use to find email_id before opening a message. For totals use email_list_folders (folder.total_count); IMAP pages are capped at 50 and listed live, keep limit small (20).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ISO 8601 UTC datetime; only emails after it (exclusive). | |
| limit | No | ||
| before | No | ISO 8601 UTC datetime; only emails before it (exclusive). | |
| cursor | No | ||
| folder_id | No | Exact folder/label ID returned by email_list_folders/email_resolve_folder. Never pass a human folder name unless the provider returned it as the ID. Mailbox folder/label ID: Exact Gmail label, Outlook folder or IMAP folder id. Obtain with: email_list_folders -> folder.id Never pass: human folder name such as Inbox when an ID is required. | |
| account_id | No | Optional Nilyo connection ID (unipile_account_id from list_connected_accounts). Omit when the user has one account for this provider. When several exist, Nilyo never guesses: list them (display name, identifier, provider user ID), choose the one the user named or ask, and pass its ID here. |