Skip to main content

Microsoft Outlook

Type ID: microsoftOutlook  ·  Kind: Action  ·  Trace: TOOL

Consume the Microsoft Outlook API: send mail and read messages for the authenticated user through Microsoft Graph.

Credentials

Microsoft Outlook

Resources & operations

  • Message (message)
    • Send (send) — Send a message.
    • Read All (readAll) — Read all messages.

Properties

Common

PropertyKeyTypeRequiredDefaultPossible valuesShown when
ResourceresourceoptionsNomessageMessage (message)
OperationoperationoptionsNosendSend (send), Read All (readAll)resource = message

Message → Send

PropertyKeyTypeRequiredDefaultPossible valuesShown when
To (Recipients)toRecipientsstringYes''Comma-separated primary recipient email addressesresource = message, operation = send
Email SubjectsubjectstringNo''Free textresource = message, operation = send
MessagebodyContentstringNo''Free text (body content)resource = message, operation = send
Advanced Email OptionsadditionalFieldsobjectNo{}Collection (see below)resource = message, operation = send

additionalFields collection options:

PropertyKeyTypeRequiredDefaultPossible values
BCC (Hidden Recipients)bccRecipientsstringNo''Comma-separated email addresses
CC (Carbon Copy Recipients)ccRecipientsstringNo''Comma-separated email addresses
Body Content FormatbodyContentTypeoptionsNoTextHTML (html), Text (Text)
Reply-To AddressreplyTostringNo''Single email address
Store in Sent ItemssaveToSentItemsbooleanNotruetrue / false

Message → Read All

PropertyKeyTypeRequiredDefaultPossible valuesShown when
OutputoutputoptionsNosimpleSimplified (simple), Raw (raw), Select Included Fields (fields)resource = message, operation = readAll
LimitlimitnumberYes100Max number of resultsresource = message, operation = readAll
FieldsfieldscheckboxYes[]bccRecipients, body, bodyPreview, categories, ccRecipients, changeKey, conversationId, createdDateTime, flag, from, hasAttachments, importance, inferenceClassification, internetMessageId, isDeliveryReceiptRequested, isDraft, isRead, isReadReceiptRequested, lastModifiedDateTime, parentFolderId, receivedDateTime, replyTo, sender, sentDateTime, subject, toRecipients, webLinkresource = message, operation = readAll, output = fields
FiltersuserFiltersobjectNo{}Collection (see below)resource = message, operation = readAll

userFilters collection options:

PropertyKeyTypeRequiredDefaultPossible valuesShown when
Filter ByfilterByoptionsNofiltersFilters (filters), Search (search)
SearchsearchstringNo''Free-text search queryfilterBy = search
FiltersfiltersobjectNo{}Nested collection (see below)filterBy = filters

userFilters.filters nested collection options:

PropertyKeyTypeRequiredDefaultPossible values
Read StatusreadStatusoptionsNounreadUnread and read messages (both), Unread messages only (unread), Read messages only (read)
Received AfterreceivedAfterdateTimeNo''ISO date string or millisecond timestamp
Received BeforereceivedBeforedateTimeNo''ISO date string or millisecond timestamp
SendersenderstringNo''Sender name or email

Notes

  • Requires a Microsoft Outlook credential; the credential ID is read from credentials.id and resolved to a bearer token. A missing token raises Workflow error, credentials missing.
  • All requests target Microsoft Graph at https://graph.microsoft.com/v1.0/me<resource> with Authorization: Bearer <token>.
  • Send calls POST /sendMail with { message, saveToSentItems }. bodyContent defaults to a single space when empty. Recipient strings (toRecipients, ccRecipients, bccRecipients, replyTo) are split on commas and converted to Graph recipient objects ({ emailAddress: { address } }); body is wrapped as { contentType: bodyContentType, content: bodyContent }. saveToSentItems defaults to true. Output: { success: true }.
  • Read All calls GET /messages with query params:
    • output = simple$select=id,conversationId,subject,bodyPreview,from,toRecipients,categories,hasAttachments.
    • output = fields$select is the comma-joined selected fields.
    • output = raw → no $select (full message objects).
    • filterBy = search$search="<query>".
    • filterBy = filters → builds $filter from sender (from/emailAddress/address or from/emailAddress/name), readStatus (isRead eq true|false, omitted when both), receivedAfter (receivedDateTime ge …), receivedBefore (receivedDateTime le …), joined with and.
    • $top is set from limit (default 100).
    • Output: { success: true, data: result.value ?? result }.
  • On error the handler throws Microsoft API request failed (<status>): <message>.