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

December 6, 2018 at 12:00 am | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, Performance, Reporting, Workflow | 1 Comment
Tags: , , , , ,

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:

image

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:

image

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

image

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:

image

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:

image

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:

image

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:

image

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:

image

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.

Advertisements

1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. […] Following on from my first blog post on Publishing all projects in Project Online using Microsoft Flow, here is the 2nd post. For those that missed the 1st part, it can be found here: https://pwmather.wordpress.com/2018/12/06/projectonline-publish-all-projects-using-msflow-microsoftf… […]


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 )

Google+ photo

You are commenting using your Google+ 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

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: