cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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
Resolver I
Resolver I

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?

Highlighted
Helper III
Helper III

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? 🙂

1.png

Highlighted
Resolver I
Resolver I

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
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager
Power Platform Communities

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (7,474)