Outlook Mail
Description: Enable agents to read, write, and send emails with Outlook.
Author: Arcade
Code: GitHub
Auth: User authorization via the Microsoft auth provider
The Arcade Outlook Mail toolkit provides pre-built tools for working with emails using the Outlook API. Use these tools to:
- Read emails
- Write emails
- Send emails
Available Tools
These tools are currently available in the Arcade Sheets toolkit.
Tool Name | Description |
---|---|
CreateDraftEmail | Compose a new draft email in Outlook |
UpdateDraftEmail | Update an existing draft email in Outlook |
SendDraftEmail | Send an existing draft email in Outlook |
CreateAndSendEmail | Create and immediately send a new email in Outlook to the specified recipients |
ReplyToEmail | Reply only to the sender of an existing email in Outlook. |
ReplyAllToEmail | Reply to all recipients of an existing email in Outlook. |
ListEmails | List emails in the user's mailbox across all folders. |
ListEmailsInFolder | List the user's emails in the specified folder. |
ListEmailsByProperty | List emails in the user's mailbox across all folders filtering by a property. |
If you need to perform an action that’s not listed here, you can get in touch with us to request a new tool, or create your own tools with the Google auth provider.
CreateDraftEmail
Compose a new draft email in Outlook.
Parameters
subject
(string, required): The subject of the email to create.body
(string, required): The body of the email to create.to_recipients
(list of strings, required): The email addresses that will be the recipients of the draft email.cc_recipients
(list of strings, optional): The email addresses that will be the CC recipients of the draft email.bcc_recipients
(list of strings, optional): The email addresses that will be the BCC recipients of the draft email.
UpdateDraftEmail
Update an existing draft email in Outlook.
This tool overwrites the subject and body of a draft email (if provided), and modifies its recipient lists by selectively adding or removing email addresses.
This tool can update any un-sent email:
- draft
- reply-draft
- reply-all draft
- forward draft
Parameters
message_id
(string, required): The ID of the draft email to update.subject
(string, optional): The new subject of the draft email. If provided, the existing subject will be overwritten.body
(string, optional): The new body of the draft email. If provided, the existing body will be overwrittento_add
(list of strings, optional): Email addresses to add as ‘To’ recipients.to_remove
(list of strings, optional): Email addresses to remove from the current ‘To’ recipients.cc_add
(list of strings, optional): Email addresses to add as ‘CC’ recipients.cc_remove
(list of strings, optional): Email addresses to remove from the current ‘CC’ recipients.bcc_add
(list of strings, optional): Email addresses to add as ‘BCC’ recipients.bcc_remove
(list of strings, optional): Email addresses to remove from the current ‘BCC’ recipients.
SendDraftEmail
Send an existing draft email in Outlook
This tool can send any un-sent email:
- draft
- reply-draft
- reply-all draft
- forward draft
Parameters
message_id
(string, required): The ID of the draft email to send
CreateAndSendEmail
Create and immediately send a new email in Outlook to the specified recipients
Parameters
subject
(string, required): The subject of the email to createbody
(string, required): The body of the email to createto_recipients
(list[str], required): The email addresses that will be the recipients of the emailcc_recipients
(list[str], optional): The email addresses that will be the CC recipients of the email.bcc_recipients
(list[str], optional): The email addresses that will be the BCC recipients of the email.
ReplyToEmail
Reply to an existing email in Outlook.
Use this tool to reply to the sender or all recipients of the email. Specify the reply_type to determine the scope of the reply.
Parameters
message_id
(string, required): The ID of the email to reply tobody
(string, required): The body of the reply to the emailreply_type
(enum (ReplyType), required): Specify “reply” to reply only to the sender or “reply_all” to reply to all recipients.
ListEmails
List emails in the user’s mailbox across all folders.
Since this tool lists email across all folders, it may return sent items, drafts, and other items that are not in the inbox.
Parameters
limit
(int, optional): The number of messages to return. Max is 100. Defaults to 5.pagination_token
(str, optional): The pagination token to continue a previous request
ListEmailsInFolder
List the user’s emails in the specified folder.
Exactly one of well_known_folder_name
or folder_id
MUST be provided.
Parameters
well_known_folder_name
(enum (WellKnownFolderNames), optional): The name of the folder to list emails from. Defaults to None.folder_id
(str, optional): The ID of the folder to list emails from if the folder is not a well-known folder. Defaults to None.limit
(int, optional): The number of messages to return. Max is 100. Defaults to 5.pagination_token
(str, optional): The pagination token to continue a previous request
ListEmailsByProperty
List emails in the user’s mailbox across all folders filtering by a property.
Parameters
property
(enum (EmailFilterProperty), required): The property to filter the emails by.operator
(enum (FilterOperator), required): The operator to use for the filtervalue
(string, required): The value to filter the emails by.limit
(int, optional): The number of messages to return. Max is 100. Defaults to 5.pagination_token
(str, optional): The pagination token to continue a previous request
Auth
The Arcade Outlook Mail toolkit uses the Microsoft auth provider to connect to users’ Microsoft accounts.
With the hosted Arcade Engine, there’s nothing to configure. Your users will see Arcade
as the name of the application that’s requesting permission.
With a self-hosted installation of Arcade, you need to configure the Microsoft auth provider with your own Microsoft app credentials.
Reference
WellKnownFolderNames
Well-known folder names that are created for users by default. Instead of using the ID of these folders, you can use the well-known folder names.
DELETED_ITEMS
(string: “deleteditems”)DRAFTS
(string: “drafts”)INBOX
(string: “inbox”)JUNK_EMAIL
(string: “junkemail”)SENT_ITEMS
(string: “sentitems”)STARRED
(string: “starred”)TODO
(string: “tasks”)
ReplyType
The type of reply to send to an email.
REPLY
(string: “reply”)REPLY_ALL
(string: “reply_all”)
EmailFilterProperty
The property to filter the emails by.
SUBJECT
(string: “subject”)CONVERSATION_ID
(string: “conversationId”)RECEIVED_DATE_TIME
(string: “receivedDateTime”)SENDER
(string: “sender/emailAddress/address”)
FilterOperator
The operator to use for the filter.
EQUAL
(string: “eq”)NOT_EQUAL
(string: “ne”)GREATER_THAN
(string: “gt”)GREATER_THAN_OR_EQUAL_TO
(string: “ge”)LESS_THAN
(string: “lt”)LESS_THAN_OR_EQUAL_TO
(string: “le”)STARTS_WITH
(string: “startsWith”)ENDS_WITH
(string: “endsWith”)CONTAINS
(string: “contains”)