MailList
Summary
Lists emails with optional filters, sorting, and paging. Ideal for inbox or work‑queue views.
Graph Endpoint
GET /me/messages
Folder‑scoped:
GET /me/mailFolders/{folder}/messages
Parameters
Optional
select: string[]
— Fields to include.filter: Array
— Simple conditions, e.g.{ field, op, value }
or{ fn, field, value }
.orderBy: Array<{ field: string, dir: 'asc'|'desc' }>
top: number
— 1..100count: boolean
— include a result countfolder: string
— Folder id or well‑known name (e.g.,Inbox
,Archive
).
Presets (optional)
Shortcuts for common list scenarios.
See: Mail Presets for all available presets and examples.
app.businessFunction({
functionName: 'MicrosoftGraph',
methodName: 'Mail',
operation: 'List',
parameters: {
preset: 'LastNDays',
presetValue: 7,
top: 50
}
})
Usage (app.businessFunction)
Minimal
app.businessFunction({
functionName: 'MicrosoftGraph',
methodName: 'Mail',
operation: 'List',
parameters: {
top: 25
}
})
With filters and sorting
app.businessFunction({
functionName: 'MicrosoftGraph',
methodName: 'Mail',
operation: 'List',
parameters: {
folder: 'Inbox',
select: ['id','subject','from','receivedDateTime','isRead','webLink'],
filter: [
{ field: 'isRead', op: 'eq', value: false },
{ fn: 'contains', field: 'subject', value: 'invoice' }
],
orderBy: [ { field: 'receivedDateTime', dir: 'desc' } ],
top: 50,
count: true
}
})
Response
{
"items": [
{
"id": "AAMkAGI2N...",
"subject": "Invoice April",
"from": { "name": "Contoso Billing", "address": "billing@contoso.com" },
"receivedDateTime": "2024-09-23T14:22:17Z",
"isRead": false,
"webLink": "https://outlook.office.com/..."
}
],
"nextLink": "...",
"count": 128
}
Last updated
Was this helpful?