Email connects your flow to your Outlook mailbox: it reads a specific email or the latest ones in a folder, sends new emails with attachments, replies to a message, moves it to another folder, marks it as read or deletes it. It also lists the mailbox folders.
Use it when a process needs to send emails from your Outlook account, or when an AI agent needs to read and handle incoming mail.
When to use it
- You want to send a client a quote generated by the flow, with the PDF attached.
- An AI agent needs to read the latest emails in the inbox and prioritise them.
- You want to reply automatically to emails that ask a common question.
- After processing an email, you want to move it to an archive folder and mark it as read.
Configuration
You need a Microsoft Outlook credential, which connects by signing in with your Microsoft account. When you create it you choose the access level: with Read Only you can only read; to send, move or delete, choose Read, Create, Send and Delete. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The Microsoft Outlook credential of the mailbox you use. |
| Operations (required) | What the component does. See Operations. By default, Get Message. |
| Selection Mode | In Get Message, what you read: By Message Id (a specific email), By Selector (the latest emails in the folder you pick in Folders) or By Folder Id (the latest emails in the folder whose identifier you type in Folder ID). By default, By Message Id. |
| Selection Mode | In Move Message, how you point to the destination folder: By Selector (you pick it in Folders) or By Folder Id (you type its identifier in Folder ID). By default, By Selector. |
| Folders | List of your mailbox folders. It loads when you choose the credential. |
| Folder ID | A folder’s identifier. You get it with Get Folders. |
| Message ID | The identifier of the email you read. In Get Message with By Message Id. |
| Message ID | The identifier of the email you work with. In Delete Message, Move Message, Mark as Read and Reply Message. |
| Max Count | How many emails are read from the folder. By default, 10. In Get Message when you read a folder. |
| Subject | The email’s subject. Only in Send Message. |
| Body | The text of the email or of the reply. In Send Message and Reply Message (required when replying). |
| Receiver | The recipient’s email address. Only in Send Message. |
| Attachments | The files to attach. Connect the output of a component that delivers files, or type a file’s web address. Only in Send Message. |
Advanced options
| Field | What it does |
|---|---|
| Fetch Attachments | When on, each email read includes the list of its attachments with their name, type and size. Off by default. In Get Message. |
| Process Attachments | Needs Fetch Attachments. When on, each attachment also includes its text (PDF, Word and other documents). Off by default. In Get Message. |
Operations
| Operation | What it does |
|---|---|
Get Message | Reads a specific email or the latest emails in a folder. |
Get Folders | Lists the mailbox folders, with their identifier, name and number of total and unread emails. |
Send Message | Sends a new email, with attachments if there are any. |
Delete Message | Deletes an email. |
Move Message | Moves an email to another folder. |
Mark as Read | Marks an email as read. |
Reply Message | Replies to an email with the text in Body. |
Output
The Data output returns one item for each email read, with its identifier, subject, sender, date received, whether it has been read, its importance, whether it has attachments, an excerpt and the first 500 characters of the body. Get Folders returns one item per folder, and the other operations return a confirmation. If an operation fails, the output contains an item with the error message instead of stopping the flow.
You can connect the result to an agent so it reads or classifies the emails, or to another component that uses their data. The component can also be connected to an Agent as a tool, so the agent decides when to read or send emails. See Tool Mode.
Example
A renovation company wants to send each client their quote as a PDF as soon as it is generated.
- The flow generates the quote as a PDF with the client’s details.
- Add Email with the
Send Messageoperation and the sales department’s Microsoft Outlook credential. - In Receiver, enter the client’s email; in Subject,
Your renovation quote; and in Body, a short covering text. - Connect the PDF to Attachments.
Good practices
- To react to emails as soon as they arrive, use Outlook Email Webhook and pass the received email’s identifier to this component.
Delete Messagedoes not ask for confirmation. If you only want to take the email out of the inbox, useMove Message.
Related components
- Outlook Email Webhook: start a flow when an email arrives.
- Calendar: manage Outlook calendar events.