Common Issues when Creating Outlook Calendar Invite through PowerApps

We have a lot of requirements to create an outlook calendar invite through PowerApps. We will discuss the common issues that users are encountering like timezone, Combobox not displays the name, Time off by x hours, or not creating invites/events when adding required attendees.

 

Setup to Add Invite

 

 

Required and Optional Attendees Items Property (Office 365 users)

 

Office365Users.SearchUser({searchTerm: “”})

 

We can also use SP Person Column

Choices([@SPList].PersonColumnName)

Set the Primary text and Searchfield for that Combobox

  • Select the Combobox
  • Click “Edit” on the right-side properties
  • Set Primary text (DisplayFields) and Searchfield as “DisplayName”

Which is

Difference between Office365 and SP column

Concat(RequiredAttendess.SelectedItems.Mail,Mail& “;”), //Office 365 Users

vs

Concat(RequiredAttendess.SelectedItems.Email ,Email & “;”), //SP Person Column

Syntax to create an invite/event

Office365Outlook.V4CalendarPostItem(
table,
subject,
start,
end,
timeZone,
{
requiredAttendees:Text,
optionalAttendees:Text,
resourceAttendees:Text,
body:Text,
location:Text,
importance:Text,
isAllDay:Boolean,
recurrence:Text,
recurrenceEnd:Text,
numberOfOccurences:Number,
reminderMinutesBeforeStart:Number,
isReminderOn:Boolean,
showAs:Text,
responseRequested:Boolean,
sensitivity:Text
}
)

OnSelect Property of ‘Send Calendar Invite”

Will split into multiple sections for easy understanding.

1. Table – Name of the Calendar from your outlook

LookUp(
Office365Outlook.CalendarGetTables().value,
DisplayName = “Calendar”
).Name

2. Subject

SubjectInput.Text

3. Start

DateAdd(
DateTimeValue(
StartDatePicker.SelectedDate & ” ” & TimeValue(
Concatenate(
StartHour.Selected.Value,
“:”,
StartMinute.Selected.Value
)
)
),
TimeZoneOffset(),
Minutes
),

4. End

DateAdd(
DateTimeValue(
EndDatePicker.SelectedDate & ” ” & TimeValue(
Concatenate(
EndHour.Selected.Value,
“:”,
EndMinute.Selected.Value
)
)
),
TimeZoneOffset(),
Minutes
),

5. Timezone

“(UTC) Coordinated Universal Time”

6. Body

body: ‘Email Content’.HtmlText

6. RequiredAttendees

requiredAttendees: Concat(
RequiredAttendess.SelectedItems.Mail,
Mail & “;”
),

7. OptionalAttendees

optionalAttendees: Concat(
OptionalAttendess.SelectedItems.Mail,
Mail & “;”
),

8. Other Few Properties

isReminderOn: Reminder.Value,
reminderMinutesBeforeStart: 30,
responseRequested: ResponseRequested.Value

Complete “Create Calendar Invite” code

Office365Outlook.V4CalendarPostItem(
LookUp(
Office365Outlook.CalendarGetTables().value,
DisplayName = “Calendar”
).Name,
SubjectInput.Text,
DateAdd(
DateTimeValue(
StartDatePicker.SelectedDate & ” ” & TimeValue(
Concatenate(
StartHour.Selected.Value,
“:”,
StartMinute.Selected.Value
)
)
),
TimeZoneOffset(),
Minutes
),
DateAdd(
DateTimeValue(
EndDatePicker.SelectedDate & ” ” & TimeValue(
Concatenate(
EndHour.Selected.Value,
“:”,
EndMinute.Selected.Value
)
)
),
TimeZoneOffset(),
Minutes
),
“(UTC) Coordinated Universal Time”,
{
body: ‘Email Content’.HtmlText,
requiredAttendees: Concat(
RequiredAttendess.SelectedItems.Mail,
Mail & “;”
),
optionalAttendees: Concat(
OptionalAttendess.SelectedItems.Mail,
Mail & “;”
),
isReminderOn: Reminder.Value,
reminderMinutesBeforeStart: 30,
responseRequested: ResponseRequested.Value
}
)

Output

Demo

Common Issues and Solutions

  1. Sending invite as UTC time
    1. “(UTC) Coordinated Universal Time”
  2. Convert time using TimeValue( to get the right format
    1. TimeValue(Concatenate(EndHour.Selected.Value,”:”,EndMinute.Selected.Value
      ))
  3. Use TimeZoneOffset
    1. DateTimeValue(EndDatePicker.SelectedDate & ” ” & TimeValue(
      Concatenate(EndHour.Selected.Value,”:”,
      EndMinute.Selected.Value))),TimeZoneOffset(),Minutes),
  4. Required Attendees are users so need to send email id with comma separators like
    1. Concat(RequiredAttendess.SelectedItems.Mail,Mail & “;”),
  5. You may get property like builtinicon:Mail, this means not accessing right property
    1. For Example, Concat(RequiredAttendess.SelectedItems.Email,Mail&”;”). It should be
    2. Concat(RequiredAttendess.SelectedItems.Email,Email&”;”)
  6. Set DisplayFields and SearchFields for the Combobox
    1. [“DisplayName”]

4 comments

  1. Hi There,
    Has anyone experienced an issue with this? I have incorporated this as part of my PowerApp but now it seems to be loading multiple calendar invites into the owner’s calendar as a calendar entry is added to a user’s calendar. I have tried to remove this code in totally but it still seems to be doing the same.
    Kindly advise.
    Many thanks,
    Melanie

  2. Hi Melanie,

    Would you please validate a few things

    1. Do you have any other “power automate” to create a calendar invite?
    2. Do you have a ForAll loop or something?
    3. Is it vary (No of entries) whenever you click it?

    Thanks
    Stalin

Leave a Reply to mohamed Cancel reply

Your email address will not be published.