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 / Count last months inco...
Power Automate
Unanswered

Count last months incoming emails to shared mailbox and post result to table

(0) ShareShare
ReportReport
Posted on by 30

Trying to build a flow that counts total received emails from last month, and filter out internal ones.

In Outlook we have 5 shared mailboxes (one for each department), some with up to 4 nested folder levels.

I get that I can use the same flow for each mailbox, but I still need to build one flow that works!

Based on different posts in this community, I've so far managed to build this. But what is wrong with my flow? Any tips, inputs or constructive feedback is much appreciated. And please, explain it to me like I'm 5.

 

The entire flow

0.jpg

 

Flow broken down

Input: Id of one of the shared mailboxesInput: Id of one of the shared mailboxes

2.jpg

3.jpg

 

Why is the Excel table returning this? Each row is two separately run flows.

marenmor_0-1676890329527.png

 

 

Categories:
  • VictorIvanidze Profile Picture
    13,083 on at

    Hello @marenmor,

    did get emails(v3) returns something or just an empty array?

     

  • marenmor Profile Picture
    30 on at

    Not sure I understand 😞 Return where, in the excel table? The last photo is all I got from the flow.

  • VictorIvanidze Profile Picture
    13,083 on at

    Could you show the output of get emails(v3) action?

  • VictorIvanidze Profile Picture
    13,083 on at

    Could you please tell me if you want to count emails

    -only in Inbox

      or

    - in Inbox and also in all subfolders of Inbox?

  • marenmor Profile Picture
    30 on at

    Thanks for getting back to me! Everything is to be counted. It's part of our monthly email traffic stats. Case managers move emails to different folders all the time.

  • VictorIvanidze Profile Picture
    13,083 on at

    To count everything you have to use a GRAPH request. Play a bit with GRAPH explorer.

  • marenmor Profile Picture
    30 on at

    Ok, but if you forget the part about counting everything. Why is excel giving me the result as shown in original post? What is wrong with my flow for that one mailbox? Something with the count.

  • VictorIvanidze Profile Picture
    13,083 on at

    It's hard to say. You should understand  yourself why variable Counter is 0 after do until.

  • VictorIvanidze Profile Picture
    13,083 on at

    Just a guess: in Condition try to use company.com instead of @company.com

  • VictorIvanidze Profile Picture
    13,083 on at

    Have a look at this freeware flow: https://ivasoft.com/countemailsflow.shtml

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 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard