Showing results for 
Search instead for 
Did you mean: 

Email a Summary of Project Online Tasks


Flow includes a list of actions for Project Online which include getting a list of projects and getting a list of tasks. This post will work fetching the late and upcoming tasks for one project and then creating the email to send. The trigger for this example will be a scheduled trigger once a week on a Monday morning. This post is split into 3 parts, getting Project ID, Listing the tasks and Sending the email. Using the same structure Flow will be split into three scopes.
The final email will look like this.


Getting Project ID

The Project Online connection includes an action of List Tasks. This action requires 2 parameters, URL of the project site and the Project ID. Unlike some other actions in flow when you enter the URL you do not get a drop down of the available projects, we need to get project id first.lateproject_01.png

We know the project name so we can fetch the list of projects and then use the name to filter the returned array. List projects action does not include an advanced features so we need to use a Filter Array action.

So before the List Tasks action can be added, I add a scope to the flow and add a List Projects action and then add a Filter Array action to filter it down to the Returned projects Project Name equalling "Training Plan".lateproject_02.pngThen we use a compose action to get the Id field from the first row in the filtered array. So I add a compose action and click on expression and add the following


Then I run the flow to check that the compose action does return a project id. The compose action should return an Id. Then I am ready to use that Id to get a list of tasks.


Fetching Tasks from Project Online

For this post I want to list Late tasks and tasks due in the next 7 days. So this will not include Summary tasks and tasks that have been completed. This means that in the List Tasks action we can use an OData filter to not include them.

I start by adding a new Scope action and rename it to Get Task Lists. I add List Tasks from the Project Online connector and use the output from the Compose action
Then I expand the Advanced options to add an OData filter which is:

IsSummary eq false and PercentComplete lt 100


In the email I want to lists of tasks, late ones and upcoming ones, so we do two filter arrays. The first filter is a simple one of the finish date being less than today so can done using the simple editor.lateproject_07.png

The scond filter array needs the Finish date to be greater than or equal to today and less than today plus 7 days. This will require the filter to edited in advanced mode. So add the Filter Array action and click Edit in advanced mode. The formula is

@and(greaterOrEquals(item()?['Finish'], utcNow()),less(item()?['Finish'], addDays(utcNow(), 7)))


Compiling Email

In order to create the email I will convert the two filtered arrays into html tables and then add headings before each table. I add the final scope to create the email. The two tables are created using the same action, from is the body from the filter array actions and I've included headings and columns are Custom. Also in order to make the due date to be short I've used the substring function to just return 10 characters of the date string, e.g. 2019-07-15.lateproject_09.png

Once the two html tables are created, they can then be used inside a Create Email action with headings. We need to expand the advanced options to select for the email to be html.lateproject_10.pngThe flow is now complete, and will now send emails weekly on late tasks.


The list of actions available to Project Online connection is limited so we cannot limit to set assignments but using filter actions a summary can be built.

Thanks for reaading!


Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, TechCommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 12 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – Youtube channel -