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

filter items and send e-mail based on Person/groups column

This will be a rather lengthy explanation, but please bear with me 🙂

 

I am building a Flow to send e-mails with an html table of items from a Sharepoint list. 

In the list, there are two Person/group columns (only persons allowed, not groups): Mottaget and Hanteras. Mottaget is mandatory, Mottaget is optional.

Items are filtered by a Filter query to get only the items from the last 8 days, and only if column Besvarat2 (yes/no) is False. This works fine.

This is to be run on a schedule. This works fine.

I want to send an email to the person in the field Mottaget, with an html table only of the items where email recipient = person in field Mottaget, but if there is a person in field Hanteras, a similar e-mail is to be sent to that person instead. This I have not figured out, and I would like som help with it.

 

Examples of how it should work:

  1. item 1 has Person A in Mottaget, column Hanteras is empty. The Flow sends an email to Person A with an html table containing item 1.
  2. item 2 and item 3 has Person B in Mottaget, column Hanteras is empty. The Flow sends an email to Person B with an html table containing item 2 and 3.
  3. item 4 has Person A in Mottaget, and Person B in column Hanteras. The Flow sends an e-mail to Person B with an html table containing item 4 (even better would be, if all of the items belonging to B were collected in one email; in the example this would be items 2, 3 and 4)

As seen in the image below, the Flow as it looks now is just configured to send an e-mail to person in Mottaget, as I wanted to make this work properly before trying to add the Hanteras column. The issue with this is, that it sends an html table of every item to every person that appear in the Mottaget column after the Filter query. In the examples above, an e-mail with the html table containing items 1, 2, 3, 4 are sent to Persons A and B, since they are both in column Mottaget.

 

The Flow as it looks right now.

Namnlöst-1.jpg

4 REPLIES 4
Community Support
Community Support

 

Hi @MrtnM ,

 

First of all, we need to know if you have specifically set the two Person columns to allow multiple selections?

Whether the Person column is set to Allow multiple selections will affect the Flow configuration.

 

If you only need to add a user to each person column, then it is recommended to set it to not allow multiple selections.

Please provide more details so that we can provide the appropriate workaround.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks!
Both Mottaget an Hanteras are for one person only.

 

Hi @MrtnM ,

 

Then you can set both fields to not allow multiple selections and then reconfigure Flow.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-bacao-msft Sorry ....
I made a mistake, I didn't double check before replying: Mottaget allows more than one person, and it has to. Hanteras allows only one.
 
Also, I do not really udnerstand what you mean by "reconfigure Flow"?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

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