#ProjectOnline and adaptive cards in #MicrosoftTeams using #MicrosoftFlow to chase users for overdue timesheets #PPM #ProjectManagement #MSProject #PowerPlatform #Office365

August 28, 2019 at 4:27 pm | Posted in Add-on, Administration, App, Configuration, Customisation, Functionality, Information, Reporting, Workflow | 1 Comment
Tags: , , , , , ,

Another example use case for adaptive cards in Microsoft Teams to add additional Office 365 Project Online integration. In this example this solution will post a card in Teams for users who have timesheets in progress that are overdue. My previous example posted to Project Owners: https://pwmather.wordpress.com/2019/08/24/projectonline-and-adaptive-cards-in-microsoftteams-using-microsoftflow-for-project-owner-actions-ppm-projectmanagement-msproject-office365-powerplatform/

This example posts to the timesheet owners who have timesheets overdue. To avoid posting to all users in Project Online, this example filters the users based on an enterprise resource custom flag field called “Timesheet Required”. The resources that need to submit timesheets have this new field set to “Yes”.

Like previous posts, I used https://adaptivecards.io/designer/ to design the card.

The Microsoft Flow can be seen below:

Flow

The Flow is triggered on a schedule then uses the Current time action to get the current time. Then a SharePoint HTTP action is used to query the ProjectData API to get a list of resources in Project Online who are required to complete timesheets:

Flow1

Next an Apply to each action is used as the previous action could return more than one resource, the output from the previous action is used for the input. Inside the Apply to each action, a SharePoint HTTP action is used to query the ProjectData API for each resource from the GetUsersForTimesheets action. In the Uri query, two variables are passed in, the resource name items(‘Apply_to_each’)[‘ResourceName’] and the current time:

Flow2

Then a condition check is used to check if there is at least one timesheet for that resource using the expression length(body(‘GetAllUsersInProgressOverdueTimesheets’)[‘value’]) :

Flow3

If there is at least one timesheet for that resource the Flow then posts a card to that resource in Microsoft Teams. This is posted to the timesheet owner using the expression items(‘Apply_to_each’)[‘ResourceEmailAddress’]. There are some dynamic values passed into the JSON too for the ResourceName items(‘Apply_to_each’)[‘ResourceName’] and count of timesheets length(body(‘GetAllUsersInProgressOverdueTimesheets’)[‘value’]):

Flow4

The card is posted to the users Flow chat as seen below:

Teams

The user will then be able to click the button to access the timesheet summary page in Project Online and update the timesheets as needed.

Another simple low / no code option for integrating Office 365 Project Online and Microsoft Teams using Microsoft Flow.

Advertisements

#ProjectOnline and adaptive cards in #MicrosoftTeams using #MicrosoftFlow for Project Owner actions #PPM #ProjectManagement #MSProject #Office365 #PowerPlatform

August 24, 2019 at 9:26 am | Posted in Add-on, Administration, App, Configuration, Customisation, Functionality, Information, Reporting, Workflow | 1 Comment
Tags: , , , , , ,

In my previous blog post I created an example of how a combination of Microsoft Teams, Adaptive Cards and Microsoft Flow can be used for project escalations by posting a card into a Microsoft Team for the PMO. In this post I’ve got a slightly different example that posts a card to a Project Owner to escalate to the project owner to action. For those that didn’t see my previous post, here is the link: https://pwmather.wordpress.com/2019/08/18/projectonline-and-adaptive-cards-in-microsoftteams-using-microsoftflow-for-project-escalations-ppm-projectmanagement-msproject-office365/

This example will post to the project owner when the project hasn’t been updated for the given period of time but the logic could easily be updated to another type of check. This has similar logic to the Flow I published last month: https://pwmather.wordpress.com/2019/07/31/projectonline-custom-email-notifications-using-msflow-microsoftflow-ppm-pmot-msproject-exchange-office365-powerplatform-planner-part-3/ 

Like in the previous adaptive card post, I used https://adaptivecards.io/designer/ to design this simple card, this time it’s slightly simpler for this example:

Card1

There are a few more actions in the Flow compared to the previous adaptive card example as this runs on a schedule and we need to perform an extra call to get the Project Owners email address. Here is the Flow overview:

FlowSummary

The trigger is based on a schedule, in this example it is running weekly as this example checks which projects have not be published in that time. Then the Flow uses the Get past time action to get the date in the past, for this example it’s 5 days ago. These steps can be seen below:

FlowActions1

The next action is a SharePoint HTTP action to query the ProjectData API in Project Online to get all projects that have not been published in 5 days using the get past time value and also where the projects are not 100 completed:

FlowActions2

The logic can be changed by updating the OData query in the Uri property if you wanted to get projects based on other criteria. Next the Flow uses an apply to each action as the previous action could return more than one project, the output from the previous action is used for the input:

FlowActions3

Within the apply to each action the Flow then uses another SharePoint HTTP action to query the ProjectServer API (note: not ProjectData so the account used in the connections will need access to all projects + the reporting OData API) to get the Project Owner details for the current project by passing in the ProjectId using the expression items(‘Apply_to_each’)[‘ProjectId’]:

FlowActions4

Now the Flow has all the data to post the adaptive card to the project owner using the JSON payload as seen in the action below. This is posted to the project owner using the expression body(‘GetProjectOwnerDetails’)[‘Email’]. There are some dynamic values passed into the JSON too for the ProjectName items(‘Apply_to_each’)[‘ProjectName’] and the ProjectId items(‘Apply_to_each’)[‘ProjectId’]:

FlowAction5

We also set the advanced options on this action to alert the user in Teams:

FlowAction6

When the Flow runs this will post to the project owner in Microsoft Teams, on my test Project Online instance I’m the owner for all the test projects so this posted to my Teams client. The alerts are displayed as seen below:

FlowTeamsAlerts

Cards are posted to the project owners Flow chat too as seen below for the projects I own that need updating:

FlowTeamsCards

The owner can then easily click the access project button to go and update the project/s as required.

Another simple low / no code option for integrating Office 365 Project Online and Microsoft Teams using Microsoft Flow.

#ProjectOnline and adaptive cards in #MicrosoftTeams using #MicrosoftFlow for Project escalations #PPM #ProjectManagement #MSProject #Office365

August 18, 2019 at 7:58 am | Posted in Add-on, Administration, App, Configuration, Customisation, Functionality, Information, Reporting, Workflow | 1 Comment
Tags: , , , ,

As Microsoft Teams is the place to be currently I thought I would blog another option for integrating Office 365 Project Online data in Teams. My previous Teams post example was to create a Team and channel for a Project as seen here: https://pwmather.wordpress.com/2019/06/12/create-a-microsoftteam-for-a-projectonline-project-using-microsoftflow-office365-microsoftgraph-ppm-workmanagement-powerplatform-azuread-collaboration-automation-part1/ & here: https://pwmather.wordpress.com/2019/06/13/create-a-microsoftteam-for-a-projectonline-project-using-microsoftflow-office365-microsoftgraph-ppm-workmanagement-powerplatform-azuread-collaboration-automation-part2/ This time we will look at adaptive cards in Teams.

Adaptive cards are not new so I wont go into detail here but if you have not used adaptive cards before, start here: https://adaptivecards.io/. There are two handy Microsoft Flow Teams actions for adaptive cards:

FlowActions

Using Microsoft Flow, I’ve built a simple Flow that posts a card in the specified channel if the published project matches the criteria, in this example I’m posting a card for projects that have a red RAG status field. I designed the card using the adaptive card designer:

CardDesigner

The Flow is very simple as seen below:

Flow1

This Flow is triggered when a project is published – this is a full project publish from either Project Online Desktop or the schedule PDP. The Flow then uses the SharePoint HTTP action to query the ProjectData API:

Flow1

Update the Uri as needed for your PWA configuration / fields you might want to use. Here we also pass in the project ID for the published project.

Next is a condition action to check for a value specific, in this example we are checking if the RAGPMStatus field has a value of “Slipped and cannot mitigate [Red]”:

Flow2

If this is true, the Flow posts the card to the channel, if it’s false the Flow ends:

Flow3

I’m posting to my example PMO Team in the Project Escalations channel. Once the Team and Channel are set, then the JSON is entered. The JSON defines the card:

Flow4

As mentioned earlier on, I used the card designer to easily build my card with the correct JSON, I then copied this into the Flow action Message field then updated the content that needed to be dynamic such as the Project Name, Owner, RAG PM Status, Project description and action URLs. This is done using the expression option such as: body(‘QueryProjectStatusRAG’)[‘fieldName’]. Once a card is created, this is the output in Teams as you can see below for my two demo projects:

Teams1

Your cards will look different based on how you design them, they will probably look a lot better too! On this card I have a background image, an image on the card, some project details then a button to access the project and another button to access the project site.

Another simple example of Microsoft Teams integration for Project Online!

Create a free website or blog at WordPress.com.
Entries and comments feeds.