Dynamics 365 out-of-the-box features assumes that resource bookings are done manually, but there is possibility automate creating Resource Requirements and Bookable Resource Booking automatically with Power Automate. While Project Operations offers variety of tables and views, there is possibility to ease users life offering a automated solution for creating requirement and booking automatically.

This Power Automate could be triggered from creation, on demand or even set as action for autonomous agent that helps out with Dynamics 365.

Power Automate gets the GUIDs of Resource Assignments that need does not have generic resource attached. The first two actions gets Active Requirement Status and Soft Booking Status rows. These could be also parameterized with environment variables. I was thinking it is easier to have one more action instead of spying the GUIDs for these in each environment.

Loop trough each Resource Assignment in a Each loop

1. Get Resource Assignment with the ID with item()

Retrieve Resource Assignment row with the ID that is passed to the Power Automate as parameter
Retrieve Resource Assignment row with the ID

2. If you wish to have the project owner as the owner of the Bookable Resource Booking, you should retrieve the Project row

Get Project data from Project table
Get Project data from Project table

3. Create the new Resource Requirement row, add the Requirement Status you want (create action outside this each loop) using first()-statement since the List Rows gives array as output.

first(outputs('List_Requirement_Status_Active_rows')?['body/value'])?['msdyn_requirementstatusid']

Then give the duration, remember to give minutes so multiply the hours with 60

mul(outputs('Get_Resource_Assignment_row_by_ID')?['body/msdyn_effort'], 60)

Then task star time, name and last link the requirement to the project.


Creating Resource Requirement row with metadata from other actions
Creating Resource Requirement row with metadata from other actions
Creating Resource Requirement row with metadata from other actions

4. Create new Bookable Resource Booking row, add the Booking Status you want (create action outside this each loop) using first()-statement since the List Rows gives array as output.

first(outputs('List_Booking_Status_Soft_rows')?['body/value'])?['bookingstatusid']

Then give the duration, remember to give minutes so multiply the hours with 60

mul(outputs('Get_Resource_Assignment_row_by_ID')?['body/msdyn_effort'], 60)

Then give the end time, you must calculate the end time

addHours(parseDateTime(outputs('Get_Resource_Assignment_row_by_ID')?['body/dg_taskstarttime']), int(outputs('Get_Resource_Assignment_row_by_ID')?['body/msdyn_effort']))

And link resource to the booking, give start time, name and link owner, project, team member and requirement to the booking.

Creating Bookable Resource Booking row with metadata from other actions
Creating Bookable Resource Booking row with metadata from other actions

5. Update the Project Team Member row allocation for the same effort as hours so that the user is booked with soft hours.

Update the Project Team Member row allocation
Update the Project Team Member row allocation
Update the Project Team Member row allocation

Now the Resource Requirements and Bookable Resource Booking are automatically created with Power Automate and the Soft Booked Hours updated to the Project Team Member. Then you can automate Project Connections in another flow when Bookable Resource Booking is create. Instruction in my previous post Automate object connections in D365 but you need to change the logic like in below picture.

Creating connections between persons and project
Creating connections between persons and project

Check if the connection has user / contact value, then instead of querying with the role and project, do the query with the user id and project.

Validating if the booking has user value
Validating if the booking has user value

Query the connection with user value, _recordid2_value is the same in Contact, but use Contact (Value) and then check if there was any rows, if not then create a new row linking it to project, connection role and systemuser.

Listing connections between systemuser and project
Listing connections between systemuser and project