Related: VIDEO: Project Management in Office 365 and Microsoft Teams
This is the second part of a series of posts where we are discussing how to use Power Virtual Agents and Power Automate to create a bot that will automate the project ideation process. If you have not seen the first part, it is available here.
Now that your bot has been configured, it is time to use its responses to create a new project idea – and, as mentioned, this needs to be done in Power Automate. Once you access the Power Automate portal, in the left navigation pane, click Solutions and then Flow:
Figure 1 – Creating a new flow |
When you start creating the flow, you will have to use the ‘When an HTTP request is received’ trigger, per the screenshot below:
Figure 2 – Selecting a trigger |
After that you will have to determine the JSON schema that will be used to process the information received. In other words, the JSON schema is the collection of strings that need to be written so that Power Automate can receive and interpret the data as it is coming from Power Virtual Agents.
If you are not familiar writing strings in JSON, you can click the Use sample payload to generate the schema option to enter the schema that needs to be generated:
Figure 3 – Generating the JSON schema through a sample |
To generate a sample, you must enter all the strings to be used in Power Automate, which should match the questions you have asked in Power Virtual Agents (and, of course, that represent the options available in the SharePoint ideation list). Here is an example:
Figure 4 – JSON |
In this example, I am collecting the following information through questions that are asked by the bot in Power Virtual Agents:
So, to generate the schema, I must type in the exact same fields, with their corresponding generic answers:
{
“Project Name” : “Sensei Project Solutions™”,
“Project Description” : “This is a blog post to demonstrate how to use Microsoft Power VA”,
“Project Department” : “Products and Solutions”,
“Proposed Start Date” : “04/01/2020”,
“Program” : “Gladstone”,
“Location” : “San Francisco, CA”
}
When finished, click Done to see the body of the JSON schema that has been generated:
Figure 5 – JSON schema |
Once the information that has been collected in Power Virtual Agents is received and interpreted, you can move to the next step to create a new record in SharePoint. Select the Create Item action and then determine the site address and the list to be used:
Figure 6 – Create a new action in SharePoint |
Power Automate will recognize all the columns available in the list, and you will be able to populate them with the metadata passed by Power Virtual Agents:
Figure 7 – Populating the SharePoint list |
Once you have configured your flow to map all the columns as needed, you can give it a name and then save it.
Now that the flow is created and ready to go, you need to configure Power Virtual Agents to call it. Back to Power Virtual Agents, navigate to your topic and put it in editing mode. Add a new step that will Call an action, and then select the appropriate flow:
Figure 8 – Calling an action in Power Virtual Agents |
This will trigger Power Virtual Agents to request you to determine how the outputs (responses) should be mapped as inputs in Power Automate (and here we see the importance of renaming the variables when creating bots):
Figure 9 – PVA and PA mapping |
So, we are finally ready to go. In Power Virtual Agents, type the keyword that will trigger the bot, and continue the interaction to provide it with the answers it needs:
Figure 10 – Running the bot |
Once completed, you can navigate to your ideation list in SharePoint and see the new project idea there:
Figure 11 – New project idea created |
Pretty nice process, don’t you think?
There are countless scenarios where bots can be created to assist users with a PPM platform such as Project Online or Project for the web. You can create bots that will guide users in how to complete a particular function, such as creating a new project. Or you could configure your bot to point users to libraries and lists within your organization, such as lessons learned, knowledge bases, reports, and so on.
In addition to this, you can also add the bot to Microsoft Teams to allow for a broader usage of it across the organization.
PMP, Microsoft Project MVP
Sensei Project solutions is a recognized global leader in Microsoft project and portfolio management (PPM) solutions focused on improving the way your team works. Sensei’s unique turn-key PPM Platform in the Microsoft Cloud, Sensei IQ™, is designed around your needs and a modern way of working. Sensei IQ™ helps you make informed decisions by understanding how all work fits together with meaningful insights into projects, resources and programs across your portfolios.