Outlook actions reference - Power Automate (2023)

  • Article
  • 8 minutes to read

For machines with an installation of Outlook, you can manage your mailboxes with the Outlook actions.

After creating an Outlook instance with the Launch Outlook action, use the Retrieve email messages from Outlook action to get the messages from a specified account and mail folder.

(Video) Power Automate desktop tutorial for beginners - Browser, Outlook, Excel and more actions

The following example retrieves all the email messages from the folder Tickets, a subfolder of the Inbox. The specified filters limit the results to messages from a specific sender that contain particular words in their subject and body.

Outlook actions reference - Power Automate (1)

The Process email messages in Outlook action processes email messages retrieved by the Retrieve email messages from Outlook action. To use this action, you must provide an Outlook instance, an account, and a variable with retrieved emails. Then, you can select whether to move, delete or mark as read the selected messages.

Store Outlook email messages locally using the Save Outlook email messages action. Specify an Outlook instance, an account, a variable with the messages to save, and the format and location for the created files.

(Video) Outlook Emails in Power Automate Desktop - Full Tutorial

To close an open Outlook instance, use the Close Outlook action.

Launch Outlook

Launch Outlook and create a new Outlook instance.

Input parameters

This action doesn't require any input.

Variables produced

ArgumentTypeDescription
OutlookInstanceOutlook instanceThe specific Outlook instance for use with later Outlook actions

Exceptions

ExceptionDescription
Failed to launch OutlookIndicates a problem launching Outlook

Retrieve email messages from Outlook

Retrieve email messages from an Outlook account.

(Video) Power Automate Automatic Reply - Set your outlook out of office with Recurrence flow

Input parameters

ArgumentOptionalAcceptsDefault ValueDescription
Outlook instanceNoOutlook instanceThe Outlook instance to work with. Specify this variable in a 'Launch Outlook' action
AccountNoText valueThe name of the Outlook account (data file name) to work with
Mail folderNoText valueThe name of the folder to retrieve messages from. Enter the full folder path for subfolders (ex: Inbox\Work)
RetrieveN/AAll email messages, Unread email messages only, Read email messages onlyAll email messagesSpecifies whether to retrieve all messages in the folder or only the unread ones
Mark as readN/ABoolean valueTrueSpecifies whether to mark as read all the unread messages retrieved
From containsYesText valueThe full email address of the sender whose messages to retrieve. Leave this attribute blank to retrieve all messages regardless of the sender
To containsYesText valueThe full email address(es) of the recipient(s) (separated by space or semicolon if more than one) for the messages to retrieve. Leave this attribute blank to retrieve all messages regardless of the recipient(s)
Subject containsYesText valueThe key phrase to find within the email subject. Leave this attribute blank to retrieve all email messages regardless of their subject
Body containsYesText valueThe key phrase to find within the email body. Leave this attribute blank to retrieve all email messages regardless of their content
AttachmentsN/ASave attachments, Do not save attachmentsDo not save attachmentsSpecifies whether to save the attachments of the email messages retrieved or not
Save attachments intoNoFolderThe path to save the attachments of the retrieved emails into

Variables produced

ArgumentTypeDescription
RetrievedEmailsList of Outlook mail messagesThe retrieved email messages for later processing. The variable contain a list of Outlook message objects

Exceptions

ExceptionDescription
Failed to find Outlook accountIndicates that the specified Outlook account doesn't exist
Mail-folder specified not valid in OutlookIndicates that the specified mail folder isn't valid
Directory for saving attachments not foundIndicates that the directory to save the attachments into doesn't exist
Failed to retrieve email messages from OutlookIndicates a problem retrieving the email messages from Outlook

Send email through Outlook

Create and send a new email message through Outlook.

Input parameters

ArgumentOptionalAcceptsDefault ValueDescription
Outlook instanceNoOutlook instanceThe Outlook instance to work with. Specify this variable in a 'Launch Outlook' action
AccountNoText valueThe name of the Outlook account (data file name) to work with
Send email fromN/AAccount, Other mailboxAccountSpecifies whether to send the email using the specified account or a different one, for example from a shared mailbox
Send fromNoText valueThe name of the Outlook account to send the email from; for example, a shared mailbox.
ToNoText valueThe email address(es) of the recipient(s). To enter more than one email address, separate the list of addresses by spaces or semicolons
CCYesText valueThe email address(es) of the CC recipient(s). To enter more than one email address, separate the list of addresses by spaces or semicolons
BCCYesText valueThe email address(es) of the BCC (hidden) recipient(s). To enter more than one email address, separate the list of addresses by spaces or semicolons
SubjectYesText valueThe subject of the email
BodyYesText valueThe text of the body
Body is HTMLN/ABoolean valueFalseSpecifies whether to interpret the body of the email as HTML coding
Attachment(s)YesList of FilesThe full path of any attachment(s). Enclose multiple files in double quotes (") and separate them by a space character

Variables produced

This action doesn't produce any variables.

Exceptions

ExceptionDescription
Failed to find Outlook accountIndicates that the specified Outlook account doesn't exist. Power Automate doesn't throw this error for the email addresses populated in the Send from input parameter
Failed to send emailIndicates a problem sending the email
Attachment not foundIndicates that the specified attachment(s) don't exist

Process email messages in Outlook

Move or deletes an email (or a list of email messages) retrieved by a 'Retrieve emails from Outlook' action.

Input parameters

ArgumentOptionalAcceptsDefault ValueDescription
Outlook instanceNoOutlook instanceThe Outlook instance to work with. Specify this variable in a 'Launch Outlook' action
AccountNoText valueThe name of the Outlook account (data file name) to work with
Email messages to processNoList of Outlook mail messagesThe email message(s) to process. Use a variable populated by a 'Retrieve email messages from Outlook' action
OperationN/ADelete email messages, Move email messages to mail folder, Mark as unreadMove email messages to mail folderSpecifies which operation to perform on the specified email messages
Mail folderNoText valueThe name of the folder to retrieve messages from. Enter the full folder path for subfolders (for example, Inbox\Work)

Variables produced

This action doesn't produce any variables.

(Video) Power Automate flow Expressions Tutorial

Exceptions

ExceptionDescription
Failed to find Outlook accountIndicates that the specified Outlook account doesn't exist
Specified mail-folder doesn't existIndicates that the specified mail folder doesn't exist
Failed to process email messages in OutlookIndicates a problem processing the specified email messages in Outlook

Save Outlook email messages

Save Outlook email messages given an account.

Input parameters

ArgumentOptionalAcceptsDefault ValueDescription
Outlook instanceNoOutlook instanceThe Outlook instance to work with. Specify this variable in a 'Launch Outlook' action
AccountNoText valueThe name of the Outlook account (data file name) to work with
Email message(s) to saveNoList of Outlook mail messagesThe email message(s) to save. Use a variable populated by a 'Retrieve email messages from Outlook' action
Save formatN/AText only (.txt), Outlook template (.oft), Outlook message format (.msg), Outlook message format - Unicode (.msg), HTML (.html), MHT files (.mht)Outlook message format (*.msg)Specifies the format to save the messages
File nameN/ADefault, CustomDefaultSpecifies whether to save the messages using the default name (subject) or provide another
Save asNoText valueSpecifies the custom name for messages' name, which differs from message to message by an automatically added suffix
Save email message(s) toNoFolderThe folder to save the messages to

Variables produced

ArgumentTypeDescription
StoredMessagesFilesList of Text valuesThe file paths of the saved email messages for later processing

Exceptions

ExceptionDescription
Failed to find Outlook accountIndicates that the specified Outlook account doesn't exist
Directory not foundIndicates that the specified email message(s) couldn't be saved because the directory doesn't exist
Email message is deleted or moved to another folderIndicates that the specified email message(s) couldn't be saved because they're moved or deleted
Failed to save email message(s)Indicates a problem saving the specified email message(s)

Respond to Outlook mail message

Respond to an Outlook message, by replying, replying to all or forwarding it.

Input parameters

ArgumentOptionalAcceptsDefault ValueDescription
Outlook instanceNoOutlook instanceThe Outlook instance to work with. Specify this variable in a 'Launch Outlook' action
AccountNoText valueThe name of the Outlook account (data file name) to work with
Mail messageNoOutlook mail messageThe mail message to act upon. Use a variable populated by a 'Retrieve email messages from Outlook' action
Response actionN/AReply, Reply all, ForwardReplySpecifies whether to reply (to sender or all) with a message or forward the received message
ToNoText valueThe email address(es) of the recipient(s). To enter more than one email address, separate the list of addresses by spaces or semicolons
CCYesText valueThe email address(es) of the CC recipient(s). To enter more than one email address, separate the list of addresses by spaces or semicolons
BCCYesText valueThe email address(es) of the BCC (hidden) recipient(s). To enter more than one email address, separate the list of addresses by spaces or semicolons
BodyYesText valueThe text of the body
Attachment(s)YesList of FilesThe full path of any attachment(s). Enclose multiple files in double quotes (") and separate them by a space character

Variables produced

This action doesn't produce any variables.

Exceptions

ExceptionDescription
Failed to find Outlook accountIndicates that the specified Outlook account doesn't exist
Failed to send emailIndicates a problem sending the email
Attachment not foundIndicates that the specified attachment(s) don't exist

Close Outlook

Close a previously launched Outlook instance.

(Video) Microsoft 365 Outlook Actions: Create Event (V4)

Input parameters

ArgumentOptionalAcceptsDefault ValueDescription
Outlook instanceNoOutlook instanceThe Outlook instance to work with. This variable is specified in a 'Launch Outlook' action

Variables produced

This action doesn't produce any variables.

Exceptions

ExceptionDescription
Failed to close Outlook instanceIndicates a problem closing the Outlook instance

Videos

1. How to Send Dynamic Emails with Power Automate Desktop
(Anders Jensen)
2. 060 - Smooth Power Automate Deployments with Connection References
(Kent Weare)
3. Send Email with Options in Power Automate
(Microsoft Power Tools)
4. How To Send Forms Responses to Outlook With Power Automate (based on the answer)
(Leila Gharani)
5. Office 365 Outlook Actions: Get Email V2
(Matt Collins-Jones)
6. Error Handling in Power Automate flows | Try Catch Scope Action
(Reza Dorrani)
Top Articles
Latest Posts
Article information

Author: Arline Emard IV

Last Updated: 03/09/2023

Views: 5940

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Arline Emard IV

Birthday: 1996-07-10

Address: 8912 Hintz Shore, West Louie, AZ 69363-0747

Phone: +13454700762376

Job: Administration Technician

Hobby: Paintball, Horseback riding, Cycling, Running, Macrame, Playing musical instruments, Soapmaking

Introduction: My name is Arline Emard IV, I am a cheerful, gorgeous, colorful, joyous, excited, super, inquisitive person who loves writing and wants to share my knowledge and understanding with you.