Home > Paul Mather, Work > #ProjectOnline Publish all projects using #MSFLow #MicrosoftFlow #PPM #PMOT #Office365 #PowerPlatform part 1

#ProjectOnline Publish all projects using #MSFLow #MicrosoftFlow #PPM #PMOT #Office365 #PowerPlatform part 1

Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

I recently had the opportunity to present at a Microsoft Tech Sync session where I presented a session on Project Online and Flow. During this session gave examples of how Microsoft Flow compliments Project Online by enabling no / low code solutions to extend the Project Online features. I plan to do several blog posts over the next month or so where I will share some of these Microsoft Flows. Hopefully this will give you some ideas of how Microsoft Flow can be used to simplify some of those customisations for Project Online.

The first Flow example I want to share with you is a publish all projects flow. I have published examples before for Project Server and Project Online as found here:

These all required a basic understanding of the Project Server / Project Online APIs and somewhere to run the code from – I thought this would be a good example to move over to a Microsoft Flow. In this blog post I will walkthrough the first example I have for publishing all projects as seen here:


This is built using only actions from the Project Online connector in Flow – so there is no need to understand the Project Online APIs! This Flow assumes you have setup the connection to Project Online using an account that has publish access to all projects. This Flow is triggered using a schedule as seen here:


When this Flow is triggered, the first action is to get all the Project Online projects using the List Projects action:


All you need to do is provide the PWA site URL. This List Projects action also includes project templates so these need to be filtered out, to do this we filter the results returned from the List Projects action using a Filter Array action:


In the From field we enter body(‘List_projects’)[‘value’] to get the data from the previous action, which in this case is the List projects action. In the filter we use item()[‘ProjectType’] is not equal to 1, Project Type 1 being the Project Templates. In advanced edit mode it looks like this:


Next we need to loop through all of the projects in the array to check them out, publish them then check them back in. To do this we need to use an Apply to each action:


In the output from the previous step we use body(‘Filter_array’) to use the data from the previous step which is all of our Project Online projects minus the project templates. Then for each project in the array we check out the project using the default Checkout project action:


Enter the Project Online PWA URL then in the Project Id property pass in the Project ID from the current item in the array using items(‘Apply_to_each’)[‘Id’]

The final action is to publish the project and check it in, this is done using the default Checkin and publish project action:


Enter the Project Online PWA URL then in the Project Id property pass in the Project ID from the current item in the array using items(‘Apply_to_each’)[‘Id’]

That is it, when this flow executes it will publish all of your Project Online projects. A simple no code serverless solution!

In part 2 we will look at two other variations for publishing all projects in Office 365 Project Online using Microsoft Flow.

Categories: Paul Mather, Work Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: