cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KCh
Level: Powered On

How to send a table information about tasks to users (assigned to) independently?

Hi!

 

I have a task list, for an example:

task1 - assigned to user1

task2 - assigned to user1

task3 - assigned to user2

task4 - assigned to user2

task5 - assigned to user1

 

How can I create a flow which will filter all tasks with dues date today and send individual emails to users to whom tasks are assigned to?

 

I have created a flow which just filter all tasks with due date today, make an HTML-table and send in to one email.

But I cann't split emails to send to users the information only about their tasks (where the user is in the fiels Assigned To).

 

Could you help please?

4 REPLIES 4
Highlighted

Re: How to send a table information about tasks to users (assigned to) independently?

Let me first make sure I understand your problem correctly: you have a table containing list of tasks and for each task, the user it is assigned to & their email. Right? Now you want to send each user the tasks they are assigned to and which are due today.

 

0. First (as you did) use a "data operation filter array" action to keep only the due items. Let's call this output the "DueTable".

 

1. The first possibility is to loop over the DueTable with an "apply to each" loop and send an email for each item found.

Pro: it is easy to build.

Con: in your example, user1 will get 3 emails and user2 will get 2 emails.

 

image.png

 

2. The more correct but also more complicated version of this, is to first perform a "distinct" filtering on your DueTable to get all the different users that are supposed to get an email and then filter the DueTable per user again before sending them digest emails.

 

The tricky operation is the "distinct" since there is no function to do this that I know of. The workaround is to do it yourself. That means looping over the table once and adding all the users to a UserTable.

 

I would do something like this:

 

image.png

 

Note the "value" parameter of the apply to each DueItem here is special to my test, it should be the "DueTable" for you.

 

At the end of this workflow, the UserArray should contain [User1, User2].

 

Finally, iterate over this UserArray, Filter the DueToday items per user, construct an HTML table with the output and send it away!

 

image.png

 

Does this makes sense?

KCh
Level: Powered On

Re: How to send a table information about tasks to users (assigned to) independently?

Hi @TimBourguignon!

 

I think that is what I'm looking for! Thank you!

I'm working with the list of tasks on the SharePoint site, but think it is a minor difference (as I understand you are working with Excel on this example)

 

Could you please provide more details how to set up actions (I marked it on the screenshort)? Could you please open it and show? Smiley Happy

1.png

Re: How to send a table information about tasks to users (assigned to) independently?

I didn't implement any of those, the picture is purely theoretical. But they should be straightforward. Did you try?

 

To get today's date, you can use something like:

 

formatDateTime(utcNow(), 'YYYY.MM.DD')

And then place this as the second value of your "is equal to" comparison filter... something like this:

 

image.png

 

The other filter arrays work similarly. Put the variable you are iterating with on the left, and the comparison variable on the right.

 

And the array variable initialization and appending are straightforward.

 

Please try it and tell us exactly where it is not working...

Administrator
Administrator

Re: How to send a table information about tasks to users (assigned to) independently?

Hey, @KCh!

 

Thank you for posting on the Flow Community Forum! It appears as though @TimBourguignon would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!

 

Thank you for being an active member of the Flow Community!

 

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Flow Community Manager

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 43 members 4,913 guests
Please welcome our newest community members: