cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Asuncion
Helper I
Helper I

Create an Event (Meeting) based on Availabilty of attendees & conference room

Hello, I'm pretty new to Power Automate, wondering if anyone else has come across this issue or can assist with a solution. Appreciate any help, thank 

 

Currently, a document is loaded onto SharePoint triggering an email notification, letting know team involved this needs to be reviewed and discussed further. Then I would like to then have an action that follows.. that finds meeting times then based on the availability automatically creates an event (meeting) for all parties. 

 

Here's what I currently have setup:

The SetupThe Setup

 

Here's the error I receive when I do a test run:

The ErrorThe Error

1 ACCEPTED SOLUTION

Accepted Solutions

@Asuncion 

 

 when you are creating event, try using following expression to get the start and end DateTime:
items('Apply_to_each')?['meetingTimeSlot']['start']['dateTime']
items('Apply_to_each')?['meetingTimeSlot']['end']['dateTime']
change loop object as per your flow (sorry if you are already doing like this).

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

10 REPLIES 10
Asuncion
Helper I
Helper I

Full error shows: 

 

{
"status": 400,
"message": "String was not recognized as a valid DateTime.\r\nclientRequestId: 802fa315-1601-4669-876c-99cbac952e89",
"error": {
"message": "String was not recognized as a valid DateTime."
},
"source": "office365-eus.azconn-eus-01.p.azurewebsites.net"
}

DeepakS
Super User
Super User

Hi @Asuncion  looking at your error it seems like apply to each function is receiving incorrect date formate or empty.

Could you please share and check what date formate are you passing in Start time and End time fields in "Find Meeting Times".

 

here is my sample flow that works fine I used -addHours(utcNow(),24,'MM/dd/yyyy HH:mm') something like this.

 

PA2.png

If this does not fix your issue share the Find Meeting Times output.

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Hello @DeepakS,

 

Thanks for your help. I'm using the following expressions for my Start and End time. I was trying to use an expression that I thought would help the flow only look for availability between 8am to 5pm (work hours). Any suggestions?

 

Start Time: 

-addHours(startOfDay(formatDateTime(convertTimeZone(utcnow(), 'UTC', 'Pacific Standard Time')), 'hh:mm'), 8 )
 
End Time:
-addHours(startOfDay(formatDateTime(convertTimeZone(utcnow(), 'UTC', 'Pacific Standard Time')), 'hh:mm'), 17)

Hi @Asuncion 

 

I just tried with your expression and still works. Could you please post what you are getting in Start Time and End Time after a run at Find Meeting Time step.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@DeepakShere is what I get from running the Find Meeting Step;

 

FindMeetingOuput.PNG

 

@Asuncion 

 

 when you are creating event, try using following expression to get the start and end DateTime:
items('Apply_to_each')?['meetingTimeSlot']['start']['dateTime']
items('Apply_to_each')?['meetingTimeSlot']['end']['dateTime']
change loop object as per your flow (sorry if you are already doing like this).

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

@DeepakStruly appreciate your help with this! The great news is that applying those expressions to my Create Event action got the flow to run successfully, however the 1 test run created 6 meetings on the Outlook calendar and Im not sure why?  

 

Looks like a 4pm meeting for each conference room (3) and a 4:30pm for each conference room (3). 

 

MeetingsCreated_1.PNG

Here are the field details from Create Event:

SuccessCreateEvent_1.PNG

Hi @Asuncion  The reason behind this you might be getting more than one available time. Not sure about your requirements, but you can create a meeting for the first occurrence of available time and discard others.

 

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@DeepakS is there a particular expression or type of dynamic content I have to apply in order to create the meeting with the first occurrence found from Find Meeting then disregard the rest?

Hi @Asuncion 

Set Max Candidates Properties to 1 on Find Meeting times action. i would also recommend you to read about other  as well, you may find them use full in your scenario :

https://docs.microsoft.com/en-us/connectors/office365/#find-meeting-times-(v2)

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,173)