Skip to main content

Each email in a mailbox (Outlook)

Go through the emails matching the Find emails filters, one per turn: id, from, subject, received, unread, has_attachments, or the whole email.

Loop type in the Microsoft 365 toolkit · id ooa.microsoft365/emails · 14 inputs, no outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Access tokenCredentialNoMicrosoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token.
FolderStringNoinboxFolder id or well-known name: inbox, archive, sentitems, deleteditems.
Unread onlyBooleanNofalseOnly unread emails.
Read onlyBooleanNofalseOnly emails already read.
From containsStringNoSender contains this text; separate several with ; to match any of them.
Subject containsStringNoSubject contains this text; separate several with ; to match any of them.
SinceDateTimeNoReceived on or after this time (UTC).
BeforeDateTimeNoReceived before this time (UTC).
Has attachments onlyBooleanNofalseOnly emails that have attachments.
Oldest firstBooleanNofalseThe oldest emails first instead of the newest.
Maximum resultsNumberNo100Stop after this many emails.
With bodyBooleanNofalseGive each email whole: text, HTML, recipients and attachment names (one more request per email); the email stays unread. Without it each email has id, from, subject, received, unread and has_attachments.
MailboxStringNomeMailbox: me, or a user's email address (needs application permission).
Endpoint addressStringNohttps://graph.microsoft.com/v1.0Graph endpoint; change only for national clouds or testing.