cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sumitmukund
Advocate I
Advocate I

Outlook Schedule Recurring Meeting

Hi All,

 

We are using PowerApps to schedule recurring outlook meetings using the function "V4CalendarPostItem" with the below parameters in the snapshot

However, the code only creates one meeting.

 

Any help would be much appreciated

 
 
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @sumitmukund ,

Please consider take a try to achieve your needs using Office365Outlook.V2CalendarPostItem(...) function. I have made a test on mu side, please consider take a try with the following workaround:

3.JPG

Set the OnSelect property of the "Post Event" button to following:

Office365Outlook.V2CalendarPostItem(
                                    Dropdown1.Selected.id, 
                                    Subject.Text, 
                                    Now(), 
                                    DateAdd(Now(), 2, Hours), 
                                   {
                                      Body: Body.Text, 
                                      Recurrence:"Daily",
                                      RecurrenceEnd: DateAdd(Now(), 2, Days), 
                                      TimeZone:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi", 
                                      NumberOfOccurrences:2
                                   }
)

The calendar events created successfully as below:

4.JPG

 

On your side, you should modify your formula as below:

Set(FollowUpStart, Now());
Set(FollowUpEnd, DateAdd(Now(), Value(Duration.Selected.Value), Minutes));
Office365Outlook.V2CalendarPostItem(
                                    MyCalendarID, 
                                    txtSubject.Text, 
                                    FollowUpStart, 
                                    FollowUpEnd, 
                                   {
                                      Body: Agenda.Text, 
                                      Recurrence: "Daily",
                                      RecurrenceEnd: DateAdd(Now(), 2, Days), // Please note here. Here you need to type date time value rather than Text value
                                      TimeZone: "Arabian Standard Time", 
                                      NumberOfOccurrences: 2
                                   }
)

Please note that the Start time and End time of the event must be within one day, the End time of the event could not across the current day, otherwise, it could not be compatible with the recurrence functionality.

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-xida-msft
Community Support
Community Support

HI @sumitmukund ,

Could you please share a bit more about your scenario?

Do you want to create a recurrence event in your Outlook calendar using Office365Outlook function in PowerApps app?

 

Based on the formula that you provided, I think there is something wrong with it. Please consider modify your formula as below:

Set(FollowUpStart, Now());
Set(FollowUpEnd, DateAdd(Now(), Value(Duration.Selected.Value), Minutes));
Office365Outlook.V4CalendarPostItem(
                                    MyCalendarID, 
                                    txtSubject.Text, 
                                    FollowUpStart, 
                                    FollowUpEnd, 
                                    "(UTC-05:00) Indiana (East)", // Modify formula here. Picked up from avaiable time zone values
                                     {
                                         recurrence: "daily",  // Modify formula here. Picked up from available options
                                         numberOfOccurences: 2, 
                                         recurrenceEnd: Text(dtMeetingEndDate.SelectedDate),
                                         body: Agenda.Text
                                     }
)

Note: The values for the timeZone argument and recurrence argument should be picked up from the available options as below:

2.JPG

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft Thanks a lot for your response.

Yes we are trying to schedule recurring calendar events using powerapps.

We tried the approach but no luck and we are getting the error in the snapshot.

 

Code:

Office365Outlook.V4CalendarPostItem(
MyCalendarID,
txtSubject.Text,
FollowUpStart,
FollowUpEnd,
"Arabian Standard Time",
{
requiredAttendees: MeetingAttendees.Text,
body: Agenda.Text,

recurrence:"weekly",

recurrenceEnd:Text(DatePicker1.SelectedDate)
}
);image.png

 
 

Hi @sumitmukund ,

Please consider take a try to achieve your needs using Office365Outlook.V2CalendarPostItem(...) function. I have made a test on mu side, please consider take a try with the following workaround:

3.JPG

Set the OnSelect property of the "Post Event" button to following:

Office365Outlook.V2CalendarPostItem(
                                    Dropdown1.Selected.id, 
                                    Subject.Text, 
                                    Now(), 
                                    DateAdd(Now(), 2, Hours), 
                                   {
                                      Body: Body.Text, 
                                      Recurrence:"Daily",
                                      RecurrenceEnd: DateAdd(Now(), 2, Days), 
                                      TimeZone:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi", 
                                      NumberOfOccurrences:2
                                   }
)

The calendar events created successfully as below:

4.JPG

 

On your side, you should modify your formula as below:

Set(FollowUpStart, Now());
Set(FollowUpEnd, DateAdd(Now(), Value(Duration.Selected.Value), Minutes));
Office365Outlook.V2CalendarPostItem(
                                    MyCalendarID, 
                                    txtSubject.Text, 
                                    FollowUpStart, 
                                    FollowUpEnd, 
                                   {
                                      Body: Agenda.Text, 
                                      Recurrence: "Daily",
                                      RecurrenceEnd: DateAdd(Now(), 2, Days), // Please note here. Here you need to type date time value rather than Text value
                                      TimeZone: "Arabian Standard Time", 
                                      NumberOfOccurrences: 2
                                   }
)

Please note that the Start time and End time of the event must be within one day, the End time of the event could not across the current day, otherwise, it could not be compatible with the recurrence functionality.

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Dorinda
Responsive Resident
Responsive Resident

@v-xida-msft I have gotten this to work all the way through with the exception of putting it on the correct start date and the index.  

 

Set(varShowSpinner, true);
Set(varMeeting,
MicrosoftTeams.CreateTeamsMeeting(
    /* users calendar, don't change*/
    LookUp(Office365Outlook.CalendarGetTables().value, DisplayName = "Calendar").Name, 
    /* Subject of the meeting, you can change*/ 
    inpSubject.Selected.MeetingName,
    //With Teams you need to declare the structure. Pretty sure you shouldn't need to change this
    {content: inpBody.Text, contentType: "html"}, 
    //Time Zone
    ddTimeZone.Selected.Value,
    //Meeting Start
    {dateTime: DateTimeValue(dpStart.SelectedDate & " " & ddHour.SelectedText.Value & ":" & ddMinute.SelectedText.Value & ddAP.SelectedText.Value)},
    //Meeting End 
    {dateTime: DateAdd(DateTimeValue(dpStart.SelectedDate & " " & ddHour.SelectedText.Value & ":" & ddMinute.SelectedText.Value & ddAP.SelectedText.Value) , Value(ddDuration.Selected.Value), Minutes)}, 
    //Is this an online meeting. Pretty sure you don't want to change this
    true,
    //I wouldn't know what else to change this to so leave it alone. 
    "teamsForBusiness",
    //everthing below is optional
    { 
    //The attendees. Separate with a ;
    requiredAttendees:Concat(Filter('Safety Meeting Attendees_1', MeetingName=inpSubject.Selected.MeetingName && 'Attendee Status'.Value = "Required"), Attendee.Email, ";"),
    //Optional attendees. Seperate with a ; 
    optionalAttendees:Concatenate(Concat(Filter('Safety Meeting Attendees_1', MeetingName=inpSubject.Selected.MeetingName && 'Attendee Status'.Value = "Optional"), Attendee.Email, ";"),";svc_powerapps@gcpud.org"),
    //optional importance flag. Values: low, normal, or high
    location: {displayName: inpLocation.Text},
    importance:ddImportance.SelectedText.Value,
    //isAllDay accepts true or false
    isAllDay: tglAllDay.Value,

    //Create recurring meeting. Value: none, daily, weekly, monthly or yearly
    recurrence: { 
                        pattern: { 
                            type: "relativeMonthly", 
                            interval: 1, 
                            daysOfWeek: ddDayofWeek.Selected, 
                            index: ddIndex.Selected.Value
                        }, 
                        range: { 
                            type: "endDate", 
                            startDate: Text( 
                                dpStart.SelectedDate, 
                                "yyyy-mm-dd" 
                            ), 
                            endDate: Text( 
                                dpRecurEnd.SelectedDate, 
                             "yyyy-mm-dd"), 
                            recurrenceTimeZone: "Pacific Standard Time" 
                           // numberOfOccurrences: inpRecurTimes 
                        } 
                    } , 
     
    /*optional but I like reminders*/
    reminderMinutesBeforeStart: Value(ddRemindMin.SelectedText.Value),
    /*optional turning on the reminder*/
    isReminderOn: ckReminders.Value,
    //Status to use during the event: Value: free, tentative, busy, oof, workingElsewhere or unknown
    showAs: ddStatus.SelectedText.Value,
    /*optional getting a confirmation they accepted/rejected your meeting */
    responseRequested:ckReceipt.Value
    }
));
Set(varShowSpinner, false);

 

 For instance, if I select the third Wednesday of each month when i submit the code it is defaulting to the first Wednesday of every month and skipping the Start day completely. 

 

Any help would be appreciated.  This is almost working perfectly.

Dorinda
Responsive Resident
Responsive Resident

@v-xida-msft any update on how to make this work?

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,103)