web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / sending invites in Boo...
Power Apps
Answered

sending invites in Book a room app template

(0) ShareShare
ReportReport
Posted on by 146

Hi, 

I want to add a feature where user can send the invites to the attendees for the meeting when he books a room for a meeting. I am using Book a room template

any Idea please?

 

Regards

 

Categories:
  • eliz_talent Profile Picture
    98 on at

    You can find here https://powerusers.microsoft.com/t5/Building-Power-Apps/Send-Calendar-Invites/m-p/302728

    Office365.V2CalendarPostItem(
     Dropdown1.SelectedText.Value,
     createMeetingNameTextInput.Text,
     timeStartDatePicker.SelectedDate + Time(
     Value(startDateHr.Selected.Value),
     Value(startDateMin.Selected.Value),
     0
     ),
     timeEndDatePicker.SelectedDate + Time(
     Value(endDateHr.Selected.Value),
     Value(endDateMin.Selected.Value),
     0
     ),
     {
     Body: createMeetingObjectiveTxtInput.Text,
     IsHtml: true,
     RequiredAttendees: EmailRecipients 
     }
    )
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @AppDeveloper ,

     

    You can add a Combo box in RoomSelectScreen to select attendees, and then add the selected attendees into Office365.V2CalendarPostItem formulas in ConfirmationScreen. Please check the steps.

    1. Add a combo box in RoomSelectScreen, set Onchange property:

     

    Set(VarAttendees,Concat(ComboBox1.SelectedItems,Mail&";"))

     

    Snipaste_2020-01-07_15-27-46.png

    2. Modify the OnVisible property of ConfirmationScreen, add VarAttendees variable into the RequiredAttendees parameter in Office365.V2CalendarPostItem function. You can replace OnVisible property by the following codes directly.

     

    If(IsBooking,
     UpdateContext({ShowLoading: true});
     If(OnlineMeeting,
     Set(OutlookMeeting, Office365.V2CalendarPostItem(
     LookUp(Office365.CalendarGetTables().value,DisplayName=LookUp(CalendarLocalizedLabel,Value=DisplayName).Value).DisplayName,
     "Outlook Meeting for " & If(BookForMeeting, MeetingsGallery.Selected.Subject, User().FullName),
     StartDateTime,
     DateAdd(StartDateTime,1,Days),{RequiredAttendees:VarAttendees}));
    
     If(BookForMeeting,
     
     ClearCollect(RequiredAttendeesNoRoom, Split(MeetingsGallery.Selected.RequiredAttendees, ";"));
     ForAll(AllRooms, RemoveIf(RequiredAttendeesNoRoom, Address = Result));
     ClearCollect(RequiredAttendeesNoRoom, Concat(RequiredAttendeesNoRoom, Result & ";"));
     ClearCollect(RequiredAttendeesNoRoom, Split(First(RequiredAttendeesNoRoom).Value, ";;"));
     Set(RequiredAttendeesFinal, First(RequiredAttendeesNoRoom).Result);
     Set(RequiredAttendeesTrue, RequiredAttendeesFinal);
     Office365.V2CalendarPatchItem(MyCalendar, MeetingsGallery.Selected.Id, If(MeetingsGallery.Selected.Subject = User().FullName & "'s Booking", User().FullName & "'s Meeting",
     MeetingsGallery.Selected.Subject), StartDateTimeUTC, EndDateTimeUTC, {RequiredAttendees: RequiredAttendeesTrue & ";" & VarAttendees, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
     Body: "<a href="&OutlookMeeting.Location&">Join Meeting</a>", IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"}),
    
     Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Meeting", StartDateTimeUTC, EndDateTimeUTC, {Body:"<a href="&OutlookMeeting.Location&">Join Meeting</a>", 
     IsHtml:true, Location: "Online Meeting", Importance: "Normal", ShowAs: "Busy"})),
    
    
    
     If(!BookForMeeting,
     Office365.V2CalendarPostItem(MyCalendar, User().FullName & "'s Booking", StartDateTimeUTC, EndDateTimeUTC, 
     {RequiredAttendees:RoomsGallery.Selected.Email &";"& VarAttendees, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"}),
     
     ClearCollect(RequiredAttendeesNoRoom, Split(MeetingsGallery.Selected.RequiredAttendees, ";"));
     ForAll(AllRooms, RemoveIf(RequiredAttendeesNoRoom, Address = Result));
     ClearCollect(RequiredAttendeesNoRoom, Concat(RequiredAttendeesNoRoom, Result & ";"));
     ClearCollect(RequiredAttendeesNoRoom, Split(First(RequiredAttendeesNoRoom).Value, ";;"));
     Set(RequiredAttendeesFinal, First(RequiredAttendeesNoRoom).Result);
     Set(RequiredAttendeesTrue, RoomsGallery.Selected.Email & ";" & RequiredAttendeesFinal);
     Office365.V2CalendarPatchItem(MyCalendar, MeetingsGallery.Selected.Id, If(MeetingsGallery.Selected.Subject = User().FullName & "'s Meeting", User().FullName & "'s Booking", MeetingsGallery.Selected.Subject), StartDateTimeUTC, EndDateTimeUTC, {RequiredAttendees: RequiredAttendeesTrue&";"&VarAttendees, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees, Body: "Room has been updated to " & RoomsGallery.Selected.Name, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"})
     )
     );
     UpdateContext({ShowLoading: false})
    );
    Set(IsBooking, false)

     

    Four modifications in total: 

    Snipaste_2020-01-07_15-37-38.pngSnipaste_2020-01-07_15-37-56.png

    Sik

     

     

     

  • AppDeveloper Profile Picture
    146 on at

    Hi @v-siky-msft 

     

    Thanks for your reply. I am going to try this solution this week. but before i do that will that send an automatic email to all attendees? or that is a separate setup?

     

    Regards

     

  • AppDeveloper Profile Picture
    146 on at

    Hi @v-siky-msft 

     

    Also I am a little bit confused with step 1. it says to add Combo box but in screen shot it is a drop down list? where this list is getting users(data source of this list??)

     

    Regards

     

  • AppDeveloper Profile Picture
    146 on at

    Hi

     

    Also I noticed that the first few lines of the code on confirmation screen is different from what you have shared. 

    If(IsBooking,
     UpdateContext({ShowLoading: true});
     If(OnlineMeeting,
     Set(SkypeMeeting, SkypeForBusiness.CreateMeeting("Skype Meeting for " & If(BookForMeeting, MeetingsGallery.Selected.Subject, User().FullName), {ExpirationDateTime: Text(DateAdd(StartDateTime, 1, Days), UTC)}));
    

    how to add those changes here when it is not using PostItem method? The rest is fine

     

    Regards

     

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    @AppDeveloper 

    1. Automatically. The function takes effect when the ConfirmationScreen become to be visible.

    2. There are two drop-down control, Combo box, and Dropdown box. one of the differences is that the combo box allows multi-selection.

    The Items property of combo box:

     

    Office365Users.SearchUser()

     

    Snipaste_2020-01-14_09-45-37.png

    3. There are two Book A Room templates. please try the new one.Snipaste_2020-01-14_09-42-31.png

    Sik

  • AB21 Profile Picture
    on at

    Hi ! 

     

    Is it possible to allow there to be no drop box for the combo box just a search?

     

     

  • Dauntless Profile Picture
    28 on at

    can you export your app with all these options cause i also want to add message and subject too + attendees.

  • Dauntless Profile Picture
    28 on at

    this code is giving me error: "OnlineMeeting" isn't recognized, name is invalid.

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard