Two Outlook steps bring email into a workflow. Search emails — Finds emails with Outlook's own search — gives one item per email found. Get an email — Reads one email: sender, subject, body and more — reads one you already have the id of.
Who can do this
Workspace Admins and Editors, on every plan.
Before you start
A Microsoft 365 connection allowed to Read and send mail.
Steps
Search emails:
- Select +, then in Apps select Outlook, then Search emails.
- In Connection, choose your Microsoft 365 connection.
- Optional: in Folder, choose a folder — Any folder in the mailbox, subfolders included. Empty searches the whole mailbox. Subfolders read as Inbox › Invoices.
- Optional: in Search for, type words — Outlook's own search — words in the subject, body or sender.
- Optional: in From, an address — accounts@northwind.example.
- Under Received, choose Any time, Today and yesterday, Last 7 days (the default), Last 30 days or Last 90 days.
- In Return at most, the most to bring back — it starts at 25. One item per email, newest first. 250 at most.
- Choose Include the body. Off (the default) returns the subject, sender and preview only — faster for long threads.
Get an email:
- Select +, then Outlook, then Get an email.
- Choose the Connection.
- In Email, put the email's id — An email's id — from the email that started the run, or a search. — such as
{{ $json.id }}after a search. - Choose Include the body. On (the default); Off returns the subject, sender and preview only.
Output
Each email, as one item:
| Field | What it is |
|---|---|
id |
The email's id — for Reply, Forward, Move, Mark, Delete and Get an attachment. |
conversationId |
Its conversation. |
subject |
The subject. |
from |
name and address of the sender. |
to, cc |
Lists of addresses. |
receivedAt, sentAt |
When. |
isRead, hasAttachments, importance |
As named. |
preview |
The first lines. |
webLink |
The email in Outlook on the web. |
folderId |
The folder it is in. |
body, bodyType |
The body, as plain text — only when Include the body is on. |
Good to know
- With words in Search for, Outlook's search decides the order and what matches. Without words, emails are filtered by sender and date, newest first.
- Search finding nothing gives no items, and the steps after it do not run. That is not a failure.
- Each email found runs the steps after it once.
If something goes wrong
| What you see | Why | What to do |
|---|---|---|
| Outlook refused: … | Microsoft refused the search or could not find the email. | Read the reason. An email moved since has a new id. |
| Could not load the folders | The folder list would not load. | Try again, or Reconnect if offered. |
| Email is empty when the step ran — … | No email id reached Get an email. | Check the step before gave one. |