Skip to content

Email

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.

FieldWhat 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 ModeIn 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 ModeIn 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.
FoldersList of your mailbox folders. It loads when you choose the credential.
Folder IDA folder’s identifier. You get it with Get Folders.
Message IDThe identifier of the email you read. In Get Message with By Message Id.
Message IDThe identifier of the email you work with. In Delete Message, Move Message, Mark as Read and Reply Message.
Max CountHow many emails are read from the folder. By default, 10. In Get Message when you read a folder.
SubjectThe email’s subject. Only in Send Message.
BodyThe text of the email or of the reply. In Send Message and Reply Message (required when replying).
ReceiverThe recipient’s email address. Only in Send Message.
AttachmentsThe 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

FieldWhat it does
Fetch AttachmentsWhen on, each email read includes the list of its attachments with their name, type and size. Off by default. In Get Message.
Process AttachmentsNeeds Fetch Attachments. When on, each attachment also includes its text (PDF, Word and other documents). Off by default. In Get Message.

Operations

OperationWhat it does
Get MessageReads a specific email or the latest emails in a folder.
Get FoldersLists the mailbox folders, with their identifier, name and number of total and unread emails.
Send MessageSends a new email, with attachments if there are any.
Delete MessageDeletes an email.
Move MessageMoves an email to another folder.
Mark as ReadMarks an email as read.
Reply MessageReplies 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.

  1. The flow generates the quote as a PDF with the client’s details.
  2. Add Email with the Send Message operation and the sales department’s Microsoft Outlook credential.
  3. In Receiver, enter the client’s email; in Subject, Your renovation quote; and in Body, a short covering text.
  4. 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 Message does not ask for confirmation. If you only want to take the email out of the inbox, use Move Message.