cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Manu06
New Member

Aggregate the sending of en email on a condition

Dear all,

I am new to power automate and I have created very simple flows thanks to the templates. but now i should create a flow that checks me for a condition before sending an email and i don't know which way to turn. I would very much appreciate your help.

 

In power bi I have following table:

Section.       Ticket.    User

Reporting   No 123  Pippo

Reporting   No 124  Pippo                  

Reporting   No 125  Pluto

Tax              No 431  Pippo

Tax              No 432  Pippo

Tax              No 433

I would like the flow to check if the user is the same, send only an email with the list of all tickets, if it is not the same, send the email with the single ticket and if the ticket has no associated user, do nothing.

Can somebody  help me? Thank you so much for your valuable support.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Manu06 ,

 

The process could be:

1. Get the unique values of the User column from Power BI database.

I don't have any bi database so use SP list as the example.

vjefferni_0-1639624156228.png

On your end, you could get the unique users from the database.

 

2. Filter the original database to get the ticket lists based on each user in the array variable. Use join function to concatenate all the filtered tickets to string or create an HTML table directly:

vjefferni_1-1639624626372.png

 

3. Send email within the Apply to each.

 

Hope this helps.

 

Best regards,

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

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
Manu06
New Member

I tried to create a flow but I have several problems that I don’t understand how to solve. For example, after the initialization of the variable, I need to set the first Variable, why power automate put it in an apply to each?

After the condition 2, why I don’t find the variable List that I set just before in the di until 2 loop? Furthermore, what I’m doing wrong that it still sends  5 emails and not 2?

Thank you very much for anyone who can help.

11223344

Hi @Manu06 ,

 

The process could be:

1. Get the unique values of the User column from Power BI database.

I don't have any bi database so use SP list as the example.

vjefferni_0-1639624156228.png

On your end, you could get the unique users from the database.

 

2. Filter the original database to get the ticket lists based on each user in the array variable. Use join function to concatenate all the filtered tickets to string or create an HTML table directly:

vjefferni_1-1639624626372.png

 

3. Send email within the Apply to each.

 

Hope this helps.

 

Best regards,

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

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,192)