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

Community site session details

Session Id :
Power Automate - Building Flows
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

 

 

I have the same question (0)
  • VictorIvanidze Profile Picture
    12,875 on at
    Re: Count last months incoming emails to shared mailbox and post result to table

    Hello @marenmor,

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

     

  • marenmor Profile Picture
    30 on at
    Re: Count last months incoming emails to shared mailbox and post result to table

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

  • VictorIvanidze Profile Picture
    12,875 on at
    Re: Count last months incoming emails to shared mailbox and post result to table

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

  • VictorIvanidze Profile Picture
    12,875 on at
    Re: Count last months incoming emails to shared mailbox and post result to table

    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
    Re: Count last months incoming emails to shared mailbox and post result to table

    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
    12,875 on at
    Re: Count last months incoming emails to shared mailbox and post result to table

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

  • marenmor Profile Picture
    30 on at
    Re: Count last months incoming emails to shared mailbox and post result to table

    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
    12,875 on at
    Re: Count last months incoming emails to shared mailbox and post result to table

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

  • VictorIvanidze Profile Picture
    12,875 on at
    Re: Count last months incoming emails to shared mailbox and post result to table

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

  • VictorIvanidze Profile Picture
    12,875 on at
    Re: Count last months incoming emails to shared mailbox and post result to table

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard