cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Steph04
Helper I
Helper I

Send specific items from sharepoint list on HTML table to the respective responsible person

Hi,

 

I'm trying to get the flow to send an HTML table on a email with the items that are overdue and with status set to "Programado" but I need to send the items that correspond to the responsible person "Supervisor".

 

The flow works... but it sends the email with all of the items overdue and with status programado, to all of the "Supervisor"s emails. How can I get this to filter the items by Supervisor?

 

The flow:

11

22

33

44

 

Help!

1 ACCEPTED SOLUTION

Accepted Solutions

Yes! It works perfect!

 

I deleted the Apply to each 3 section as you said and then changed the "Create HTML Table" from field to Body('Filter_Array_2').

 

The Flow:

 

11223344

 

Thank you very much for your help @efialttes !

View solution in original post

18 REPLIES 18
efialttes
Super User
Super User

Hola!

If I were you, I would create a dictorary with all Supervisors, then an Apply to Each looping through all of them, inside the apply to each an additional Filter array getting all items with that particular Supervisor + Create HTML Table + Send an email.

You can create the dictionary by means of a SElect Action block, and then by using union() function on the Select result.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi again

I see you already implemented this tchnique... which is the input of your 'Filter array 2'?

Body('Filter_array') right?

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi again (x3)

If I were you I would move 'Create HTML array', both 'compose' ('Format HTML' and 'Spacing') and also 'Send an email' inside 'Apply to each 2'. Yo do not need 'Apply to each 3'

These changes should do the magic

Animo!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@efialttes  I moved the create html table, format and spacing compose functions but I still receive the email with all of the items 

 

5.png

Hi again!

which is the input of your 'Filter array 2'?

Body('Filter_array') right?

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Yes! its Body('Filter_Array')

Thanx!

If I were you I would include a Dummy Compose after 'Filter array 2' with the following expression:

length(body('Filter_array_2'))

 

And also the same after 'Filter array' with a similar expression:

length(body('Filter_array_2'))

 

Please reexecute and report if values are the same for both

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@efialttes  Did it and I still get the same email with all of the items 😞 

 

6.png

I know, I know... but which values are reported inside these two Dummy Composes in this last execution?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Sorry I'm not that good with MS Flow, I don´t understand the question, what do you mean by "values reported" or where can I see these"? @efialttes 

No problema

https://docs.microsoft.com/en-us/power-automate/see-a-flow-run

The video is a bit old, but from the "my flows" tab you can click on the current flow you are having problems with and on the bottom of the page displayed you will see your last flow runs, click on your latest execution and you will be able to inspect the outputs in each action block

THis is worth a ton of Thumbs up, at least one per each partial answer I posted! 😁

Just kidding... Hope this helps

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Flow_troubleshooting.png



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@Steph04 

Thanx for your kindness! Did you managed to solve the filter problem by yourself?

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Yes! It works perfect!

 

I deleted the Apply to each 3 section as you said and then changed the "Create HTML Table" from field to Body('Filter_Array_2').

 

The Flow:

 

11223344

 

Thank you very much for your help @efialttes !

View solution in original post

BJkenn
Frequent Visitor

I have been trying to duplicate this flow, but can't seem to set the same values. My troubles are with values which appear to be dynamic content (in the flow example you provide) which are not available to me. Are there steps in your flow which weren't in the pictures?

 

1. When I go to set the EmailAddress variable, I don't get Body('Compose'). I can insert outputs('Compose'). Does that matter? If so, how do I get Body('Compose') as the value?

 

Set Variable EmailAddress 

 

2. Where does "Supervisor2.Em..." come from in Filter Array 2? I can't find that anywhere in dynamic content. In your original post, it's shown as an expression - item()['Supervisor2']['Email']

 

Filter Array 2 - CurrentItem equal to Supervisor2.Em... 

 

2. Where do the values come from in Create HTML table? In your original example, they appear to be variables. In the second, they look to be Outputs. I'm guessing from the icons. When I go to select a value from dynamic content, I only have outputs under Compose and Body & Item under Filter Array.

 

Create HTML Table values 

 

Appreciate any help you can provide.

Hi @BJkenn 

 

Hope this helps:

 

Q1= When I go to set the EmailAddress variable, I don't get Body('Compose'). I can insert outputs('Compose'). Does that matter? If so, how do I get Body('Compose') as the value?

 

A1= You are right, it's outputs('Compose'). The description shown in the image is wrong, instade of Body is Outputs.

 

Q2= Where does "Supervisor2.Em..." come from in Filter Array 2? I can't find that anywhere in dynamic content. In your original post, it's shown as an expression - item()['Supervisor2']['Email']

 

A2= I had to look for the real column name so that the flow could recognize the value, to do find out which was the real name I had to add a compose action and insert the "supervisor email" dynamic content, then, if you place your mouse above you will see the real name. Like shown in the next image.

 

Picture1.png

Q3= Where do the values come from in Create HTML table? In your original example, they appear to be variables. In the second, they look to be Outputs. I'm guessing from the icons. When I go to select a value from dynamic content, I only have outputs under Compose and Body & Item under Filter Array.

 

A3= For the values on the "Create HTML Table" section, I did the same, I had to look for the real name of the columns using a compose action. These are expressions, you have to type "item()['_______']" in the line you have to place the real column name the compose action shows you.

 

 

 

 

I am doing a similar flow but only focus on supervisor and no status needed to be focused. May I know after I delete the filter array, any changes on the below steps? Thank you.

suthichaia
Frequent Visitor

suthichaia_0-1634993555355.png

I'm trying to get the flow to send an HTML table on an email with the items with status set to "No" but I need to send the items that correspond to the "Users".

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,213)