Microsoft 365 List

Microsoft 365 List

Certified

List Outlook emails

Lists messages from a folder with optional OData filter and paging. Supports FETCH/FETCH_ONE/STORE outputs. Requires Microsoft Graph permission Mail.Read (application).

yaml
type: io.kestra.plugin.microsoft365.outlook.List

List recent emails from inbox

yaml
id: list_outlook_emails
namespace: company.team

tasks:
  - id: list_emails
    type: io.kestra.plugin.microsoft365.outlook.List
    tenantId: "{{ secret('AZURE_TENANT_ID') }}"
    clientId: "{{ secret('AZURE_CLIENT_ID') }}"
    clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
    userEmail: "user@example.com"
    folderId: "inbox"
    top: 10

List emails with filter and store to internal storage

yaml
id: list_filtered_emails
namespace: company.team

tasks:
  - id: list_emails
    type: io.kestra.plugin.microsoft365.outlook.List
    tenantId: "{{ secret('AZURE_TENANT_ID') }}"
    clientId: "{{ secret('AZURE_CLIENT_ID') }}"
    clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
    userEmail: "user@example.com"
    folderId: "inbox"
    filter: "isRead eq false and receivedDateTime ge {{ now() | dateAdd(-7, 'DAYS') | date('yyyy-MM-dd') }}T00:00:00Z"
    top: 50
    fetchType: STORE

Get first message only

yaml
id: get_first_email
namespace: company.team

tasks:
  - id: get_first
    type: io.kestra.plugin.microsoft365.outlook.List
    tenantId: "{{ secret('AZURE_TENANT_ID') }}"
    clientId: "{{ secret('AZURE_CLIENT_ID') }}"
    clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
    userEmail: "user@example.com"
    folderId: "inbox"
    fetchType: FETCH_ONE
    top: 1
Properties

Azure client ID

Application (client) ID of the Graph app registration

Azure client secret

Client secret for the app registration; required for client-credentials flow

Azure tenant ID

Entra tenant (directory) ID used for Graph auth

User email

Mailbox to monitor; if not specified, uses the authenticated user's mailbox.

DefaultFETCH
Possible Values
STOREFETCHFETCH_ONENONE

The way you want to store the data

FETCH - outputs the messages as an output FETCH_ONE - outputs the first message only as an output STORE - stores all messages to a file NONE - no output

Filter

OData filter expression (e.g., isRead eq false, from/emailAddress/address eq 'sender@example.com')

Defaultinbox

Folder ID

Folder to read (inbox, sentitems, drafts, deleteditems, or folder ID)

Reference (ref) of the pluginDefaults to apply to this task.

Defaulthttps://graph.microsoft.com/.default

Scopes

Space-separated Graph scopes; default uses .default application permissions

Default50

Top

Maximum number of messages to return in this call

User principal name

Mailbox UPN/email to act on; defaults to app context when omitted

Default0

Message count

Number of messages retrieved

Folder ID

Folder that was queried

Has next page

True when Graph returned @odata.nextLink

Single message (FETCH_ONE)

Definitions
bodyPreviewstring
conversationIdstring
fromMailstring
hasAttachmentsboolean
idstring
importancestring
isReadboolean
receivedDateTimestring
Formatdate-time
senderMailstring
sentDateTimestring
Formatdate-time
subjectstring

List of messages (FETCH)

Definitions
bodyPreviewstring
conversationIdstring
fromMailstring
hasAttachmentsboolean
idstring
importancestring
isReadboolean
receivedDateTimestring
Formatdate-time
senderMailstring
sentDateTimestring
Formatdate-time
subjectstring
Formaturi

URI of stored messages file (STORE)