#Office365 #ProjectfortheWeb #MicrosoftTeams integration #ProjectManagement #PPM #MSProject #PowerPlatform Part 2

In the last post we started looking at integration options for Project for the Web in Microsoft Teams, this post can be found here: https://pwmather.wordpress.com/2019/11/16/office365-projectfortheweb-microsoftteams-integration-projectmanagement-ppm-msproject-powerplatform-part-1/

This post continues with the Project for the Web and Microsoft Teams integration theme but this time creating a Project directly from Teams using a bot. This makes use of the new Power Virtual Agents feature that is currently in preview: https://powervirtualagents.microsoft.com/ In this post we will build a very simple Power Virtual Agent, PVA for short, that will enable to user to create a project in the Project for the Web service.

In the first part (Part 2 of the series) we create the PVA bot and Power Automate Flow. Firstly access the Power Virtual Agents preview and create a new bot, I’ve created one called “Project Creation”:


I wont cover all the possible options for the PVAs as these are well documented here: https://docs.microsoft.com/en-us/power-virtual-agents/, I will just cover the minimum to get started creating a project. Click the “Customize your greeting” button to load the default Greeting topic editor:


Here on the canvas you can create / edit the steps for the greeting topic. I’ve deleted some of the default messages, updated a message and about to add a question:


I’ve created my first question that the bot will ask the user:


This is taking the entire response as the answer and saving it to the projectName variable. The next question is asking for the start date:


This is identifying the responses as Date and time and saving it to the startDate variable. As you can see this added two conditions in but I will delete those as they are not required in this bot. The final question is asking the user which department is the project for. Department is a custom field I have in the project entity:


This is a multiple choice question to give the user a option to select, I’ve matched the options here that are available my custom Department Option set in the CDS. The answer will be saved to the department variable. As you can see this added three conditions in but I will delete those as they are not required in this bot. Next we need to call an action to create the project. This will call a Flow, create the Flow using the “Create a flow” option if you do not have the Flow yet:


That will take you to the Flow editor with the Power Virtual Agents Flow Template loaded:


Modify this Flow as needed and update the name. Here is my Flow:


Key changes highlighted below:

Updated the JSON schema to support the data the PVA is passing in:


Added a switch action to handle the different departments:


Then within each case, add a “Create a new record” CDS action to create the project, here is the Marketing project example:


Pass in the details as needed, the key parts for this post is that I’m passing in the Name value and the Start Date value from the PVA bot. I’ve hard coded items like the Project Manager in this example. For other setting, see this post for details: https://pwmather.wordpress.com/2019/11/11/office365-projectfortheweb-project-request-process-using-microsoftforms-cds-and-powerautomate-projectmanagement-ppm-msproject-powerplatform/ Repeat this for each case in the switch action. The final action is the response to the PVA, this has been updated with the correct outputs that I want to post back:


For this Flow to be available, it needs to be added to a solution. To do this navigate to the Power Apps home and click Solutions > New solution and complete the form then click create. Access the new solution and click Add exiting from the command bar:


Select Flow then click Outside Solutions and select the Flow then click Add:


Now back in the PVA bot editor window, click “Call an action” again" and select the Flow that was added to the solution and set the variables:


We then add another message to inform the user that the project has been created and end the conversation:


Save the bot and test it:



We can now see the new empty project that has been created:


That’s it for part 2 of this series, in part 3 we will look at adding this bot in to Microsoft Teams. Power Virtual Agents are pretty awesome for low / no code bots, try out the preview and see what you think!

One thought on “#Office365 #ProjectfortheWeb #MicrosoftTeams integration #ProjectManagement #PPM #MSProject #PowerPlatform Part 2

Comments are closed.

Blog at WordPress.com.

Up ↑

%d bloggers like this: