Skip to content

Get Emails By Mailbox Node

The Get Emails By Mailbox node allows you to retrieve emails from a specific mailbox using a Microsoft Azure service account. It supports filtering by sender, recipient, subject, and keywords, as well as limiting the results by date, folder (Inbox only), and read/unread status.

Node Category

  • Category: Task
  • Task Type: Get Emails By Mailbox
  • Icon: mdi mdi-email

Purpose

This node is used to search and retrieve emails from a Microsoft 365 mailbox. It provides flexible filters and options for narrowing down which messages are returned. The result is stored in a variable for use in subsequent nodes.


Input Fields

LabelTypeDescriptionRequiredVisible When
Service AccounttextID of the Microsoft Azure service account to use for authentication.YesAlways
Email AccounttextEmail address of the mailbox to search.YesAlways
Maximum Emails to RetrievenumberThe maximum number of emails to return (between 1 and 1000).YesAlways
Filter TotextFilter emails by recipient (To field).NoAlways
Filter FromtextFilter emails by sender (From field).NoAlways
Filter SubjecttextFilter emails by subject content.NoAlways
Keywords searchtextKeywords to search within the email body.NoAlways
Inbox Folder onlybooleanIf true, only emails in the Inbox will be searched.NoAlways
Unread EmailsbooleanIf true, only unread emails will be retrieved.NoAlways
Date AfterdateTimeReturn emails received after this date.NoAlways
Date BeforedateTimeReturn emails received before this date.NoAlways

Output

Output VariableDescription
EmailsA list of email message objects matching the filters applied.

Each email in the Emails output variable is an object containing fields such as sender, recipients, subject, body preview, and timestamp (structure depends on emailMessageSimple class).


Validation Rules

  • Service Account must be provided and valid.
  • Email Account must be a valid and accessible mailbox address.
  • Maximum Emails to Retrieve must be between 1 and 1000. Any other value results in failure.

Remarks

  • If the service account cannot be retrieved, the task will return a failure status with a descriptive message.
  • This node is useful for automated processing of emails such as detecting new instructions, alerts, or incoming data based on filters.
  • The node uses Microsoft Graph API via the EmailService class internally.

Tentech 2024