
Microsoft 365 List
CertifiedList Outlook emails
Microsoft 365 List
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).
type: io.kestra.plugin.microsoft365.outlook.ListExamples
List recent emails from inbox
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
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
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
clientId *Requiredstring
Azure client ID
Application (client) ID of the Graph app registration
clientSecret *Requiredstring
Azure client secret
Client secret for the app registration; required for client-credentials flow
tenantId *Requiredstring
Azure tenant ID
Entra tenant (directory) ID used for Graph auth
userEmail *Requiredstring
User email
Mailbox to monitor; if not specified, uses the authenticated user's mailbox.
fetchType string
FETCHSTOREFETCHFETCH_ONENONEThe 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 string
Filter
OData filter expression (e.g., isRead eq false, from/emailAddress/address eq 'sender@example.com')
folderId string
inboxFolder ID
Folder to read (inbox, sentitems, drafts, deleteditems, or folder ID)
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
scopes string
https://graph.microsoft.com/.defaultScopes
Space-separated Graph scopes; default uses .default application permissions
top integerstring
50Top
Maximum number of messages to return in this call
userPrincipalName string
User principal name
Mailbox UPN/email to act on; defaults to app context when omitted
Outputs
count integer
0Message count
Number of messages retrieved
folderId string
Folder ID
Folder that was queried
hasNextPage boolean
Has next page
True when Graph returned @odata.nextLink
message
Single message (FETCH_ONE)
io.kestra.plugin.microsoft365.outlook.domain.MessageSummary
date-timedate-timemessages array
List of messages (FETCH)
io.kestra.plugin.microsoft365.outlook.domain.MessageSummary
date-timedate-timeuri string
uriURI of stored messages file (STORE)