web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow is returning all ...
Power Automate
Unanswered

Flow is returning all the rows

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

All,

 

Please help as I have been stuck on this for 3 days. (I am new to MsFlow).

 

I have a table as shown below and I need a method to get the rows that were created in the morning (there are evening rows as well), append them to an 1 email and send them out. 

 

1) issue, I was getting 20 some email - I figured that my email was in the loop

2)  Filter doesn't seem to work and return all the results.  I have tried to use the following formula and still no resutls.  I tried to use format(Created), 'yyyy-mm-dd' and format the today(), 'yyyy-mm-dd'

still . Filter doesn't seem to be working and always returning teh same results.

3) changed my approach to use ticks using the follwoing formula: 

div(sub(int(variables('todayInTicks')),int(variables('createdTicks'))),864000000000)

get the result and if it is = 0 then send an email. Again wrong results. 

I only need to show what is in red inthe email.

Any help or example is greatly appreciated.

 

Thanks,flow.jpgflow2.jpg

 

 

 

 

 

 

 

 

Categories:
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I am wondering how I should understand the condition of "created in the morning".

    I assume that you want to get the information of the item created current day, and integrate this information into an HTML table and send it to you as the content of the email.

    You could configure your Flow by referring to the screenshot below:

    Expression reference:

    @equals(formatDateTime(item()['Created'], 'yyyy-MM-dd'), utcNow('yyyy-MM-dd'))

    40.PNG

    Expression reference:

    replace(body('Create_HTML_table'),'<table>','<table border="1">')

    41.PNG

    Please take a try.

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for Replaying. Perhaps i need to explain  my issue a bit better. 

     

    Every morning, someone in the team will test and checks a number of tasks. 

    Every task is a row in a SP list. So, there could be 1 or 10 tasks. 

     

    I noticed, that If I rely on MS Flow, it will send out an email ffor each row. So the users get (i.e. 3 emails if they checked 3 tasks). What i was trying to do is to gett 1 email for all the tasks was selected. I just couldn't figure out what formula should I use to get the rows that was just submitted and send only 1 email for all of them. 

    Any hint is appreciated.

     

    I will try your approach in couple of days and le you know.

     

    thanks again,

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi there,

     

    Update:

     

    Still if multiple items are selected, it sends multiple emails, but thank you , it gave me some ideas. 

    Ss there any where that I can incorporate another condition (i.e. say a flag is set to send only morning items vs evening items . so if checks are done twice a day (Morning and Evening) since they all have the same date, we need to send email and identify those with the morning flag. 

    I tried to do it with @equals(formatDateTime(item()['Created'], 'yyyy-MM-dd'), utcNow('yyyy-MM-dd')) and place a "AND" next to it and it did not work. Any hint on that?

     

    Thanks again for your instructions.

     

    Gulf_Man

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi 

    Yes and No. I will tell you about the who project and then maybe there is a way to do it.

    Currently I have a gallery that has a number of items with checkboxes in it. If a user run the app and selects a number of tasks then it is sussposed to send 1 email. However since I used a forAll loop and patch to find the selected tasks, every time a row was commited to the db it would send 1 email. if 3 tasks were selected, then 3 eail would go out. After seeing your reply (and thanks for that) I noticed where I was going wrong. The trigger can't be when an item is creted, it should be a schedule.

    So, now I have to find a way to make everything into 1 row and submit it. 

     

    Thanks again,.

    Gulf_man

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard