Skip to content

Get Emails By Mailbox ​

Retrieves email messages from a specified Microsoft 365 mailbox using a service account, with support for filtering by sender, recipient, subject, keywords, and date range.

Purpose ​

Use this task when a workflow needs to read emails from a shared or delegated mailbox rather than the authenticated user's own inbox. It is useful for monitoring team inboxes, support queues, or any mailbox accessible through a service account. The retrieved messages are stored in an output variable for downstream processing such as routing, classification, or automated responses.

Inputs ​

FieldTypeRequiredDescription
Email AccountTextNoThe email address of the mailbox to search.
Unread EmailsCheckboxNoWhen checked, only unread messages are returned.
Inbox Folder onlyCheckboxNoWhen checked, the search is restricted to the Inbox folder.
Maximum Emails to RetrieveTextNoThe maximum number of emails to return. Must be between 1 and 1000. Defaults to 10.
Date AfterDate / TimeNoOnly include emails received after this date and time.
Date BeforeDate / TimeNoOnly include emails received before this date and time.
Filter ToTextNoFilter emails by the address in the To field.
Filter FromTextNoFilter emails by the sender's address.
Filter SubjectTextNoFilter emails whose subject contains this text.
Keywords searchTextNoFilter emails whose body contains these keywords.

Outputs ​

NameDescription
EmailsA list of email message objects matching the applied filters. Each object contains message metadata such as sender, recipients, subject, and body preview. Downstream tasks can iterate over this list or inspect individual messages.

Tentech