Skip to main content

Notifications

Community site session details

Community site session details

Session Id : LZrF32217fvtRXokirxGZe
Power Automate - Building Flows
Answered

Daily count of emails in shared mailbox folder

Like (1) ShareShare
ReportReport
Posted on 20 Nov 2021 07:32:21 by 271

Hi all,

 

I am trying to achieve an automated count of emails in a shared mailbox folder at the end of each day, but ignoring what date the email was received as they could be from previous dates.

 

I had been trying to achieve this by adding a row to a list when they are added to the folder, but discovered that emails with a date prior to the last flow run were not counted as new so that is not an option.

 

Ideally I would like to be able to schedule a flow to run, count what is in the folder (named DONE) and then move all of those emails to another folder.

 

I am absolutely stumped!!

 

any help would be great

  • Steve-J Profile Picture
    2 on 18 Nov 2023 at 12:14:57
    Re: Daily count of emails in shared mailbox folder

    Hi, I have been using this solution with great success for a final day count of emails into a shared folder but I am looking for advice on how to tweak it slightly. 

    I have a main inbox that I use for a RPA process that runs between 06:00 and 20:00. The solution reads emails and then processes a request but due to the end time being 20:00 it means that I sometimes have mails in an unread state which carry over to the next day. 

    What I would like to do is adjust the solution in this thread to only move read emails and leave any unread in the main inbox and then perform the write to table with the days value.

     

    Is there a way that the same solution can be set to only moved read mails and leave unread? Having tried I suspect one reason it fails to work is the variable being set to 0 for the end of process. With the potential for unread mails being present this condition wouldn't always bet met. 

     

    Thanks in advance for any advice

  • mespiritu Profile Picture
    57 on 08 Nov 2023 at 06:22:48
    Re: Daily count of emails in shared mailbox folder

    what is your count? 1 or the default 60?

    mespiritu_0-1699424562817.png

     

  • VictorIvanidze Profile Picture
    12,212 on 06 Nov 2023 at 06:39:58
    Re: Daily count of emails in shared mailbox folder

    Try this: https://ivasoft.com/countemailsflow.shtml

  • mespiritu Profile Picture
    57 on 06 Nov 2023 at 03:36:32
    Re: Daily count of emails in shared mailbox folder

    Tried to do what you  posted as the solution in this thread but I can't seem to count if the received items is more than 10 as the get items (emails) top is only 10

  • nirav_kalola Profile Picture
    2 on 20 Apr 2023 at 04:45:37
    Re: Daily count of emails in shared mailbox folder

    Hi v-LilyW-msft,

     

    I have implemented above flow for one of our shared mailbox. seems working fine.

     

    Once we action any e-mails, we will move it to actioned folder so I selected actioned folder under compose and move them to another folder however where can I specify date range such only yesterday email or last months emails so I can report only to last month or yesterday emails.

     

    Currently this flow dosent stop and moving all emails from action folder to another folder.

     

    Any help would be appreciated.

  • VictorIvanidze Profile Picture
    12,212 on 22 Feb 2023 at 07:42:21
    Re: Daily count of emails in shared mailbox folder

    Hi @LarryAlx,

    sorry I don't catch your point. What's your question? 

  • LarryAlx Profile Picture
    44 on 16 Feb 2023 at 17:03:42
    Re: Daily count of emails in shared mailbox folder

    Hey @VictorIvanidze 

     

    Does this go in a power automate step?

    What is the connector?

    The second row has a users id of some sort, where do I get that?

    I'm trying to also get a count of how many email's we have replied to.  Can I use this GRAPH request for this?

     

    Appreciate any help.

  • VictorIvanidze Profile Picture
    12,212 on 05 Jul 2022 at 11:52:28
    Re: Daily count of emails in shared mailbox folder

    It means you've "hard-coded" the id. I told you how to get it dynamically when your flow is running.

  • Gwill1983 Profile Picture
    271 on 05 Jul 2022 at 11:25:20
    Re: Daily count of emails in shared mailbox folder

    Thanks for this. 

     

    I found it in the end by creating a new TEST flow using the trigger of receiving an email into the folder that I required. I then peeked at the code after this had run and the ID was in there. 

  • VictorIvanidze Profile Picture
    12,212 on 05 Jul 2022 at 09:50:37
    Re: Daily count of emails in shared mailbox folder

    Hi @Gwill1983, the only way to find the ID of the subfolder I see is using a GRAPH request.

     

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