Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Flow send email for every Excel row instead of the filter

(1) ShareShare
ReportReport
Posted on by 15

Hi everyone,

 

I'm totally new to Power Automate and I'm trying to create one simple flow for starting.

 

I have an Excel table similar to this one

 

Task1Task Description 1Date 1
Task2Task Description 2Date 2
Task3Task Description 2Date 3

 

I have created a flows that checks if the date of the table is equal to today a date and send an email with the entire rows. So, basically:

if Date 1= today it sends an email with Task1, Task Description 1 and Date 1.

 

The flow is working except for the fact that sends a number of email equal to the total of the rows. So, taking the example above, it is sending 3 copy of the same email with the same information about the first row, instead of sending just one.

 

This is the flow:

 

Ponzaro_0-1651329657389.png

 

Can you kindly help me in understanding why?

 

Thanks

  • Ponzaro Profile Picture
    15 on at
    Re: Flow send email for every Excel row instead of the filter

    Thank you!😎

  • Verified answer
    v-yujincui-msft Profile Picture
    on at
    Re: Flow send email for every Excel row instead of the filter

    Hi @Ponzaro ,

     

    Try to use the length() function.

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#length

    length(body('Filter_array'))

    vyujincuimsft_0-1652668199652.png

     

     

    Best Regards,

    Charlie Choi

  • Ponzaro Profile Picture
    15 on at
    Re: Flow send email for every Excel row instead of the filter

    Hi @v-yujincui-msft ,

     

    thank you for all the support! I can confirm that the flow is working fine and I have been also able to add an action to send a Teams message along the email.

     

    One last request, if possible: I have seen that the email (and Teams message) are being sent also if there is no data, and so they are empty.

     

    I have tried to add a condition that checks if the array is empty, and if yes, not send anything but I am not able to make it working. I've tried this:

     

    Ponzaro_0-1652603560581.png

    It returns "false" anyway, even if there are no results. I have also tried using the expression empty without success. Do you have any suggestion on this?

     

    Thanks

  • v-yujincui-msft Profile Picture
    on at
    Re: Flow send email for every Excel row instead of the filter

    Hi @Ponzaro ,

     

    You could use multiple conditions in the Filter array Action by using the expression.

    I have made a test for your reference.

    toUpper(item()?['ColumnName'])

    vyujincuimsft_0-1652407090464.png

    Result Screenshots:

    vyujincuimsft_1-1652407142603.png

    vyujincuimsft_2-1652407191883.png

     

     

    Best Regards,
    Charlie Choi

  • Ponzaro Profile Picture
    15 on at
    Re: Flow send email for every Excel row instead of the filter

    Hi @v-yujincui-msft

     

    thank you very much! I can confirm that everything is working fine 😀. If possible, I have another optimization in mind, if this can be configured.

    I would like to add a new column where a person can write "yes" (no case sensitive) if the task has been completed, so the email will continue to arrive until that column is filled.

     

    Task1Task Description 1Date 1yes
    Task2Task Description 2Date 2yes
    Task3Task Description 2Date 3 

     

    Taking the example above, only the first two rows should be selected and sent through the email.

     

    I have tried to insert another "filter array" with this new condition but it is being ignored...

     

    Do you think that is it possible?

     

    Thank you very much

     

    Andrea

  • Verified answer
    v-yujincui-msft Profile Picture
    on at
    Re: Flow send email for every Excel row instead of the filter

    Hi @Ponzaro ,

     

    Do you want to send an email with all eligible records?

    Maybe you could try as below:

    vyujincuimsft_0-1651800931014.png

    vyujincuimsft_1-1651801013816.png

    Result Screenshot:

    vyujincuimsft_2-1651801048747.png

     

     

    Best Regards,
    Charlie Choi

  • Ponzaro Profile Picture
    15 on at
    Re: Flow send email for every Excel row instead of the filter

    Hi @v-yujincui-msft ,

     

    thank you very much for the answer! I tried it and it works flawlessly 😀

     

    Just one thing... would it be possible to send a single email with the entire list of all the rows selected instead of one email with a row each?

     

    Thank you

     

    Andrea

  • Verified answer
    v-yujincui-msft Profile Picture
    on at
    Re: Flow send email for every Excel row instead of the filter

    Hi @Ponzaro ,

     

    Maybe you need to use Body as the input of Apply to each Action.

    vyujincuimsft_0-1651470462975.png

    I have made a test for your reference.

    1. Here is my excel.

    vyujincuimsft_1-1651470489443.png

    2. Here is my Flow.

    item()?['columnname']
    [
    {
    "Task Name":"",
    "Take Description":"",
    "Date":""
    }
    ]

    vyujincuimsft_2-1651470622990.png

    vyujincuimsft_5-1651471035432.png

    vyujincuimsft_4-1651470755666.png

    Result Screenshot:

    vyujincuimsft_6-1651471202157.png

     

    Best Regards,

    Charlie Choi

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow