Skip to main content

Overview

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

Key Features

  • 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
  • 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)

Authentication

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. 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.
  • 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.