cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Consolidated Email to the assigned user weekly for tasks due

Hi,

 

Using the solution here: https://powerusers.microsoft.com/t5/General-Flow-Discussion/microsoft-flow-get-all-items-with-distin..., I have setup an exact flow to send one email out listing all tasks for a given user and it works great without any issues. The solution works on one task list.

 

In my case under root site, I have about 4 sub-sites and on each of these subsites contain one task list so total 4 task lists. All the task lists have same columns in use. Now the requirement is to send a weekly email out to the assigned user letting them know about the tasks with all task status except Completed. 

 

The solution listed on the link I mentioned works only for one task list, can we make it work for more than one task list across the site collection? The goal is to send only one email out to user listing all tasks assigned to him in different task list across the site collection, is this possible to do using flow? Please help.

 

Thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: Consolidated Email to the assigned user weekly for tasks due

Hi dmistry,

According to your description, you want  to send one email to remind a given user all the tasks from four lists.

As the four task lists have same columns, I suggest you to use the Compose action to combine data in one array.

Then you can use the data from one output.

I have made a flow for your scenario, please check it for a reference.

The expression is: union(body('Get_items')?['value'],body('Get_items_2')?['value'],body('Get_items_3')?['value'],body('Get_items_4')?['value'])

1.pngNext, you can follow the solution here: https://powerusers.microsoft.com/t5/General-Flow-Discussion/microsoft-flow-get-all-items-with-distin...

2.png3.png

Please feel free post back if you need more help.

Best regards,

Zhonys

View solution in original post

8 REPLIES 8
Highlighted
Solution Sage
Solution Sage

Re: Consolidated Email to the assigned user weekly for tasks due

Hi dmistry,

According to your description, you want  to send one email to remind a given user all the tasks from four lists.

As the four task lists have same columns, I suggest you to use the Compose action to combine data in one array.

Then you can use the data from one output.

I have made a flow for your scenario, please check it for a reference.

The expression is: union(body('Get_items')?['value'],body('Get_items_2')?['value'],body('Get_items_3')?['value'],body('Get_items_4')?['value'])

1.pngNext, you can follow the solution here: https://powerusers.microsoft.com/t5/General-Flow-Discussion/microsoft-flow-get-all-items-with-distin...

2.png3.png

Please feel free post back if you need more help.

Best regards,

Zhonys

View solution in original post

Highlighted
Post Prodigy
Post Prodigy

Re: Consolidated Email to the assigned user weekly for tasks due

@v-zhos-msft, Can you provide some info on why Create HTML table is used twice?

Highlighted
Post Prodigy
Post Prodigy

Re: Consolidated Email to the assigned user weekly for tasks due

@v-zhos-msft, can you also share an expanded view of each action/condition in flow screenshot, just want to make sure that I follow the steps exactly as depicted to make it work, thanks in advance.

Highlighted
Solution Sage
Solution Sage

Re: Consolidated Email to the assigned user weekly for tasks due

Hi dmistry,

The first Create HTML table is to check wheather I have compose the four lists data together. You can ignore about it.

Regards,

Zhonys

Highlighted
Post Prodigy
Post Prodigy

Re: Consolidated Email to the assigned user weekly for tasks due

@v-zhos-msft, Hi, I was able to make the flow to work and I do get email showing tasks from three different task lists in one email but then flow shows as run failed. Any idea? I do not have any mandatory columns in any of the lists.

Capture.PNG

Highlighted
Solution Sage
Solution Sage

Re: Consolidated Email to the assigned user weekly for tasks due

Hi dmistry,

I have attached some screenshots of my flow to hopefully help you out with yours.

Capture1.PNG

Formula value for 'Append to Array Variable' :

first(item()?['AssignedTo'])?['Email']

 Capture2.PNG

Init Variable 2 Formula 

union(variables('AssignedToEmailArray'),variables('AssignedToEmailArray'))

The output of Filter Array is come from Compose action.

Filter Array Formula:

@equals(first(item()?['AssignedTo'])?['Email'], first(variables('Email')))

Capture3.PNG

Send to Formula:

first(variables('AssignedToEmailArray'))
Capture5.PNG
 

Skip Formula 

skip(variables('Email'),1)

Set variable Output is the output from Compose 2 

 

Regards,

Zhongys

Highlighted
Post Prodigy
Post Prodigy

Re: Consolidated Email to the assigned user weekly for tasks due

@v-zhos-msft I revised the flow as per the screenshots you sent, for some reason though I am not seeing a temlpate invalid error, failing on Select.

Capture.PNG

 

For Task Description, I am using item()?['Body'] formula, still it does not work. Filter array inputs adn outputs look the same for some reason.

Capture.PNG

Highlighted
Post Prodigy
Post Prodigy

Re: Consolidated Email to the assigned user weekly for tasks due

@v-zhos-msft, I was able to make it to work. The tasks coming from different lists had description column left empty and that is why flow was failing. Once I populated description column, flow then worked well. One question I have, is there a way we can add some condition that can check if the columns in select action are empty or not. I mean I will have to force users to populate these columns but if not then how can we make it work if a task does not have description column populated.

 

I want to make sure that the flow works if any of the column in select action are not populated in SP task list. Appreciate any help on this,thanks.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,423)