Send An Email Notification Using Outlook.com Connector In PowerApps

Introduction


In my previous article Send An Email Notification Using Mail Connector In PowerApps we have seen the Mail Connector in action.
 
In this article, let's have a look at the Outlook.com connector to send email notifications in Power Apps without using Power Automate Flow. You will get to see the different actions that you can call in Power Apps. There are few actions that are deprecated by Microsoft and will be eventually removed. I will list down the deprecated actions in this article, consider replacing deprecated actions with the latest release of actions in your applications.
 
Most of the actions of the Outlook.com connector are circled around all things events in a calendar along with sending emails with and without attachments.
 
Just to be clear, in this article we will see Outlook.com connector along with its general available actions (excluding deprecated actions) in Power Apps. There are triggers and actions available for Outlook.com connector in Power Automate which would possibly be another article series of "Send emails using the different connector in Power Automate". Stay tuned!
 
Now, let's get started. 


Outlook.com Connector


As per Microsoft documentation (refer to Reference section for the link to this documentation), on the addition of Outlook.com connector, it will always ask for access to an Outlook mailbox that has the REST API enabled. So make sure you have this pre-requisite in place.
 
Let me quote an important note by Microsoft for enterprise accounts: 
 
This connector is no longer supporting enterprise accounts due to security policies. Existing connections will continue to work for some time, but new connections are not allowed. Enterprise accounts should use the Office 365 Outlook connector which has the same functionality as the Outlook.com connector. While we understand switching connectors is not trivial, this is necessary to allow better security controls for our users.
 
With that said, another point to note on throttling limit for Outlook.com connector is it's 300 API calls per connection and renewed after 60seconds.
 
List of available actions (excluding deprecated actions) Table 1,
 
Action in Power Apps Operation ID 
Create Contact  ContactPostItem 
Create event  V3CalendarPostItem 
Delete contact   ContactDeleteItem 
Delete email DeleteEmail 
Delete event  CalendarDeleteItem 
Flag email  Flag 
Forward an email  ForwardEmail 
Get attachment  GetAttachment 
Get calendar view of events (V2)  GetEventsCalendarViewV2 
Get calendars  CalendarGetTables 
Get contact   ContactGetItem 
Get contact folders  ContactGetTables 
Get contacts  ContactGetItems 
Get email  GetEmail 
Get emails (V2)  GetEmailsV2 
Get event  V2CalendarGetItem 
Get events  V3CalendarGetItems 
Mark as read  MarkAsRead 
Move email  Move 
Reply to email (V3)  ReplyToV3 
Respond to an event invite  RespondToEvent 
Send an email (V2)  SendEmailV2 
Send approval email SendApprovalEmail 
Send email with options  SendMailWithOptions 
Update contact  ContactPatchItem 
Update event (V3) V3CalendarPatchItem 
 
Syntax of each action listed in Table 1
 
ContactPostItem
  1. ContactPostItem(    
  2.  table,    
  3.  GivenName,    
  4.  HomePhones,    
  5.    {    
  6.     Id:Text,     
  7.     ParentFolderId:Text,    
  8.     Birthday:DateTime,    
  9.     FileAs:Text,    
  10.     DisplayName:Text,    
  11.     Initials:Text,    
  12.     MiddleName:Text,    
  13.     NickName:Text,    
  14.     Surname:Text,    
  15.     Title:Text,    
  16.     Generation:Text,    
  17.     EmailAddresses:Table,    
  18.     ImAddresses:Table,    
  19.     JobTitle:Text,    
  20.     CompanyName:Text,    
  21.     Department:Text,    
  22.     OfficeLocation:Text,    
  23.     Profession:Text,    
  24.     BusinessHomePage:Text,    
  25.     AssistantName:Text,    
  26.     Manager:Text,    
  27.     BusinessPhones:Table,    
  28.     MobilePhone1:Text,    
  29.     HomeAddress:Record,    
  30.     BusinessAddress:Record,    
  31.     OtherAddress:Record,    
  32.     YomiCompanyName:Text,    
  33.     YomiGivenName:Text,    
  34.     YomiSurname:Text,    
  35.     Categories:Table,    
  36.     ChangeKey:Text,    
  37.     DateTimeCreated:DateTime,    
  38.     DateTimeLastModified:DateTime    
  39.    }    
  40. )   
V3CalendarPostItem
  1. V3CalendarPostItem(  
  2.  table,   
  3.  Subject,   
  4.  Start,   
  5.  End,  
  6.   {  
  7.     TimeZone:Text,  
  8.     RequiredAttendees:Text,  
  9.     OptionalAttendees:Text,  
  10.     ResourceAttendees:Text,  
  11.     Body:Text,  
  12.     Location:Text,  
  13.     Importance:Text,  
  14.     IsAllDay:Boolean,  
  15.     Recurrence:Text,  
  16.     RecurrenceEnd:DateTime,  
  17.     NumberOfOccurrences:Number,  
  18.     Reminder:Number,  
  19.     ShowAs:Text,  
  20.     ResponseRequested:Boolean     
  21.    }  
  22. )    
ContactDeleteItem
  1. ContactDeleteItem(  
  2.  table,  
  3.  id  
  4. )  
DeleteEmail
  1. DeleteEmail(  
  2.  messageId  
  3. )  
CalendarDeleteItem
  1. CalendarDeleteItem(  
  2.  table,  
  3.  id  
  4. )  
Flag
  1. Flag(  
  2.  messageId  
  3. )  
ForwardEmail
  1. ForwardEmail(  
  2.  message_id,  
  3.  ToRecipients,  
  4.     {  
  5.     Comment:Text  
  6.     }  
  7. )  
GetAttachment
  1. GetAttachment(  
  2.  messageId,  
  3.  attachmentId  
  4. )  
GetEventsCalendarViewV2
  1. GetEventsCalendarViewV2(  
  2.  calendarId,  
  3.  startDateTimeOffset,  
  4.  endDateTimeOffset,  
  5.     {  
  6.     '$filter':Text,  
  7.     '$orderby':Text,  
  8.     '$top':Number,  
  9.     '$skip':Number,  
  10.     search:Text   
  11.     }  
  12. )  
CalendarGetTables
  1. CalendarGetTables()  
ContactGetItem
  1. ContactGetItem(  
  2.  table,  
  3.  Id  
  4. )  
ContactGetTables
  1. ContactGetTables()  
ContactGetItems
  1. ContactGetItems(  
  2.  table,  
  3.     {  
  4.     '$filter':Text,  
  5.     '$orderby':Text,  
  6.     '$top':Number,  
  7.     '$skip':Number  
  8.     }  
  9. )  
GetEmail
  1. GetEmail(  
  2.  messageId,  
  3.     {  
  4.     includeAttachments:Boolean  
  5.     }  
  6. )  
GetEmailsV2
  1. GetEmailsV2(  
  2.     {  
  3.     folderPath:Text,  
  4.     to:Text,  
  5.     cc:Text,  
  6.     toOrCc:Text,  
  7.     from:Text,  
  8.     importance:Text,  
  9.     fetchOnlyWithAttachment:Boolean,  
  10.     subjectFilter:Text,  
  11.     fetchOnlyUnread:Boolean,  
  12.     fetchOnlyFlagged:Boolean,  
  13.     mailboxAddress:Text,  
  14.     includeAttachments:Boolean,  
  15.     searchQuery:Text,  
  16.     top:Number  
  17.     }  
  18. )  
V2CalendarGetItem
  1. V2CalendarGetItem(  
  2.  table,  
  3.  id  
  4. )  
V3CalendarGetItems
  1. V3CalendarGetItems(  
  2. table,  
  3.     {  
  4.     '$filter':Text,  
  5.     '$orderby':Text,  
  6.     '$top':Number,  
  7.     '$skip':Number  
  8.     }  
  9. )  
MarkAsRead
  1. MarkAsRead(  
  2.  messageId  
  3. )  
Move
  1. Move(  
  2.  messageId,  
  3.  folderPath  
  4. )  
ReplyToV3
  1. ReplyToV3(  
  2.  messageId,  
  3.     {  
  4.     To:Text,  
  5.     Cc:Text,  
  6.     Bcc:Text,  
  7.     Subject:Text,  
  8.     Body:Text,  
  9.     ReplyAll:Boolean,  
  10.     Importance:Text,  
  11.     Attachments:Table     
  12.     }   
  13. )  
RepondToEvent
  1. RepondToEvent(  
  2.  event_id,  
  3.  response,  
  4.     {  
  5.     Comment:Text,  
  6.     SendResponse:Boolean  
  7.     }  
  8. )  
SendEmailV2
  1. SendEmailV2(  
  2.  To,  
  3.  Subject,  
  4.  Body,  
  5.     {  
  6.     From:Text,  
  7.     Cc:Text,  
  8.     Bcc:Text,  
  9.     Attachments:Table,  
  10.     ReplyTo:Text,  
  11.     Importance:Text  
  12.     }  
  13. )  
SendApprovalEmail
  1. SendApprovalEmail(  
  2.  NotificationUrl,  
  3.  Message  
  4. )  
SendMailWithOptions
  1. SendMailWithOptions(  
  2.  NotificationUrl,  
  3.  Message  
  4. )   
ContactPatchItem
  1. ContactPatchItem(  
  2.  table,  
  3.  id,  
  4.  GivenName,  
  5.  HomePhones,  
  6.    {  
  7.     Id:Text,   
  8.     ParentFolderId:Text,  
  9.     Birthday:DateTime,  
  10.     FileAs:Text,  
  11.     DisplayName:Text,  
  12.     Initials:Text,  
  13.     MiddleName:Text,  
  14.     NickName:Text,  
  15.     Surname:Text,  
  16.     Title:Text,  
  17.     Generation:Text,  
  18.     EmailAddresses:Table,  
  19.     ImAddresses:Table,  
  20.     JobTitle:Text,  
  21.     CompanyName:Text,  
  22.     Department:Text,  
  23.     OfficeLocation:Text,  
  24.     Profession:Text,  
  25.     BusinessHomePage:Text,  
  26.     AssistantName:Text,  
  27.     Manager:Text,  
  28.     BusinessPhones:Table,  
  29.     MobilePhone1:Text,  
  30.     HomeAddress:Record,  
  31.     BusinessAddress:Record,  
  32.     OtherAddress:Record,  
  33.     YomiCompanyName:Text,  
  34.     YomiGivenName:Text,  
  35.     YomiSurname:Text,  
  36.     Categories:Table,  
  37.     ChangeKey:Text,  
  38.     DateTimeCreated:DateTime,  
  39.     DateTimeLastModified:DateTime  
  40.    }  
  41. )  
V3CalendarPatchItem
  1. V3CalendarPatchItem(    
  2.  table,     
  3.  id,    
  4.  Subject,     
  5.  Start,     
  6.  End,    
  7.   {    
  8.     TimeZone:Text,    
  9.     RequiredAttendees:Text,    
  10.     OptionalAttendees:Text,    
  11.     ResourceAttendees:Text,    
  12.     Body:Text,    
  13.     Location:Text,    
  14.     Importance:Text,    
  15.     IsAllDay:Boolean,    
  16.     Recurrence:Text,    
  17.     RecurrenceEnd:DateTime,    
  18.     NumberOfOccurrences:Number,    
  19.     Reminder:Number,    
  20.     ShowAs:Text,    
  21.     ResponseRequested:Boolean       
  22.    }    
  23. )    
List of deprecated actions
 
Action in Power Apps Operation ID
Create event (V1)  CalendarPostItem
Create event (V2)  V2CalendarPostItem
Get calendar view of events  GetEventsCalendarView 
Get emails  GetEmails 
Get event (V1)  CalendarGetItem 
Get events (V1)  CalendarGetItems 
Get events (V2)  V2CalendarGetItems 
Reply to email (V2)  ReplyToV2 
Reply to email   ReplyTo 
Send an email  SendEmail 
Update event (V1)  CalendarPatchItem 
Update event (V2)  V2CalendarPatchItem 
 

Summary

 
In this article, we have seen the Outlook.com connector in PowerApps, the actions used to perform various activities in Outlook calendar events and emails. We have also seen the list of available actions and a list of deprecated actions. This article mainly provides you with a quick look at the syntax of each available action and gives you a clear understanding of what you can do with that action.
 
References
 
https://docs.microsoft.com/en-us/connectors/outlook/