Skip to main content
The Outlook Mail tools allow you to list messages from Outlook mail folders and send emails through Outlook using the Microsoft Graph API.

List messages

  • OUTLOOK_LIST_MESSAGES
    • List messages from an Outlook mail folder
    • Optional folder input (e.g., Inbox); if omitted, lists messages across all folders
    • Optional search query using Microsoft Graph $search (matches subject, body, and sender)
    • top controls the number of messages to fetch (1-50, default: 10)
    • include_body_preview toggles whether each message includes a body preview (default: true)
    • Returns each message’s id, subject, sender, received date, body preview, and web link

Send an Outlook email

  • OUTLOOK_SEND_MESSAGE
    • Send an email through Outlook
    • to_emails accepts an array or a comma-separated string; optional cc_emails and bcc_emails
    • body supports HTML or plain text, selected via content_type (HTML or Text, default: HTML)
    • save_to_sent_items controls whether the message is saved to Sent Items (default: true)
    • Optional attachment_urls attaches files (combined size up to 20 MB); attachment_names renames them, paired by position

Connect with Microsoft Graph

To use the Outlook Mail tools, you need to navigate to the Jinba secrets dashboard and authenticate with your Microsoft account. This will create a new OAuth token for you. If the Microsoft sign-in stops at Need admin approval, see Organization Admin Consent. Note: Treat API keys as sensitive information and never commit them to public repositories. For further details, click here.

Usage Examples

Example: Search the Inbox and Send a Summary

Example: Send an HTML Email

Notes

  • OUTLOOK_LIST_MESSAGES can fetch at most 50 messages per run (top accepts 1-50).
  • OUTLOOK_SEND_MESSAGE returns the HTTP status of the Microsoft Graph sendMail request (202 on success); the response normally has no body.
  • attachment_urls accepts an array, a JSON array string, or a comma-separated string (pass URLs that contain commas as an array). Each URL is downloaded and attached; the combined raw size of all attachments must stay within 20 MB. attachment_names is optional and paired with attachment_urls by position — when omitted, the filename from the URL is used.
  • Sends whose body plus attachments exceed the inline Graph request limit (about 3 MB encoded) go through a draft message with chunked uploads. A draft send always lands in Sent Items regardless of save_to_sent_items, and returns result.status without webLink. Attachment-free sends always honor save_to_sent_items.
  • Recipient inputs (to_emails, cc_emails, bcc_emails) accept an array, a JSON array string, or a comma-separated string.
  • Set include_body_preview to false when you only need message metadata and want to keep outputs compact.