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”
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
- Sending invite as UTC time
- “(UTC) Coordinated Universal Time”
- Convert time using TimeValue( to get the right format
- TimeValue(Concatenate(EndHour.Selected.Value,”:”,EndMinute.Selected.Value
))
- TimeValue(Concatenate(EndHour.Selected.Value,”:”,EndMinute.Selected.Value
- Use TimeZoneOffset
- DateTimeValue(EndDatePicker.SelectedDate & ” ” & TimeValue(
Concatenate(EndHour.Selected.Value,”:”,
EndMinute.Selected.Value))),TimeZoneOffset(),Minutes),
- DateTimeValue(EndDatePicker.SelectedDate & ” ” & TimeValue(
- Required Attendees are users so need to send email id with comma separators like
- Concat(RequiredAttendess.SelectedItems.Mail,Mail & “;”),
- You may get property like builtinicon:Mail, this means not accessing right property
- For Example, Concat(RequiredAttendess.SelectedItems.Email,Mail&”;”). It should be
- Concat(RequiredAttendess.SelectedItems.Email,Email&”;”)
- Set DisplayFields and SearchFields for the Combobox
- [“DisplayName”]
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
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
How can i add an attachment to the invite?
No option to send an attachment with an invite.