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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Basic flow to count li...
Power Automate
Answered

Basic flow to count list items each day and add to Excel

(0) ShareShare
ReportReport
Posted on by 94

 Sometimes it's the simplest ones that give me the most trouble.  I have a flow that each day moves our sent emails from a shared mailbox to the archive folder, counts them and returns the total number from the prior workday into a row in Excel.  The sent part is working great. 

 

To capture our daily received count, we have a SharePoint list that populates the Sender, Subject and Received date/time column. 

 

I want to add on to the end of my Sent Count flow a simple action to get the items from the SharePoint list from the prior day (in my screenshot, I have it set to minus 4 because we get Friday's counts on Tuesdays), and then return that day's total number of items back into the Excel spreadsheet. 

 

My sent count is always returning correctly, but no matter what I've tried for the received count, it returns a value.  (I have pagination turned on for Get Items)

 

I had also tried a simple Get Items with ODATA filter and then a compose length action, that didn't work.  I think this is more the path I need, but I can't get it to give me the count of the prior day's total items.  I just want to know that we received 183 emails Friday without having to go to the SharePoint list and retrieve the number manually. 

 

ReceivedCount1.pngReceivedCount2.png

 

Categories:
I have the same question (0)
  • Fsomers68 Profile Picture
    94 on at

    I also tried switching the Filter Query expression to account for date/time field and it's still returning a 0: 

     

    ReceivedCount3.png

     

    I created a separate manual flow to try to test different approachesout based on a YT video that returned the number of items in a list rather easily, by manual trigger - get items - compose with the length function but it too returns 0: 

    Fsomers68_0-1664907560670.png

     

  • Verified answer
    Fsomers68 Profile Picture
    94 on at

    In case anyone else is looking for a solution, this is what worked for me: 

     

    Fsomers68_1-1666697507418.png

    The second expression for the greater than or equal to uses -1 instead of 0.  The simple date without the time also worked. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard