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 unread inbox emails
Power Automate
Answered

Count unread inbox emails

(0) ShareShare
ReportReport
Posted on by 30

Hello, I am new in Automate and I have a task: create a flow that each day at 9 am send an alert in teams with the number of unread emails in the INBOX folder of an specific email.

 

I have this with the first part indicating the hour, then the email connection and at the end the message in teams, but I do not know how to count the unread emails and add it to the message

eduardosilvin_0-1700268003902.png

 

 

Thanks in advance

Categories:
I have the same question (0)
  • Verified answer
    creativeopinion Profile Picture
    10,508 Moderator on at

    @eduardosilvin You'll need to switch to the Classic Designer to follow along. Click the three dots (top right of the screen) and select Switch to classic designer.

    creativeopinion_5-1700279472527.png

     

     

    Get Emails (V3) Limitations

    It's important to note that the Get emails (V3) action has a limit of 25 emails that it'll return. The default is 10. I'll explain how to bypass this limit below.

     

    creativeopinion_3-1700279341275.png

     

    Get Email Count

    To return a count of items you need to use an expression. Add a Compose action to store the expression. Click on the Expression tab and insert the length() function.

    length()

    creativeopinion_1-1700279244796.png

     

    With your cursor in between the brackets, select the Dynamic Content tab. Insert the value dynamic content from the Get Emails (V3) action.

    creativeopinion_2-1700279281179.png

     

    Run a test. The number of unread emails will be stored in the Compose action. 

    creativeopinion_4-1700279365427.png

     

    Send an HTTP Request (Outlook)

    You can bypass the 25 email limit by using a Send an HTTP Request action instead. Insert the text below into the URI field. Customize the top count number to suit your requirements.

     

    https://graph.microsoft.com/v1.0/me/messages?$filter=isRead eq false&top=100

    creativeopinion_7-1700280546232.png

    Run a test. Copy the outputs to your clipboard. Tip: Place your cursor in the outputs and press CTRL + A or CMD + A to select all. 

    creativeopinion_8-1700280577197.png

    Add a Parse JSON action. In the Content field insert the body dynamic content from the Send an HTTP Request action. 

     

    Press the Generate from Sample button.

    creativeopinion_10-1700280601486.png

     

    Paste the content from your clipboard and press Done.

    creativeopinion_11-1700280612168.png

    In a Compose action use the length() function (refer to instructions above) and insert the value dynamic content from the Parse JSON action. 

    creativeopinion_12-1700280647881.png

     

    Run a test. Verify the outputs. 

    creativeopinion_13-1700280674746.png

     

    Add Count to Teams Post

    In your Post message in a chat or channel action, insert the Outputs from the Compose action that is storing the number of unread emails into the Message box.

    creativeopinion_14-1700280897398.png

     

    For clarification: 

    If you are using the Send an HTTP request action, your flow should look like this

    creativeopinion_1-1700353228479.png

     

    If you are not using the Send an HTTP request action, your flow will look like this

    creativeopinion_2-1700353256962.png

     

    Hope this helps!


    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉Watch my tutorials on YouTube
    👉Tips and Tricks on TikTok

     

  • VictorIvanidze Profile Picture
    13,081 on at

    Modify this flow: https://ivasoft.com/countemailsflow.shtml

  • eduardosilvin Profile Picture
    30 on at

    Thank you so much, is a great explanation, just one more doubt, where should I add the HTTP request? after the compose of "get email count"?

  • creativeopinion Profile Picture
    10,508 Moderator on at

    @eduardosilvin Sorry if the mis-communication. I have updated my original post for clarification.

     

  • eduardosilvin Profile Picture
    30 on at

    AWESOME, thank you because you explained it so well, you are the best! regards!

  • VictorIvanidze Profile Picture
    13,081 on at

    Hi @creativeopinion,

    very informative, but don't you think the "Parse JSON" action is useless here?

    You can simplify the flow a bit just using  

    length(body('Send_an_HTTP_request')?['value'])

     

  • eduardosilvin Profile Picture
    30 on at

    Hello Victor, sorry I did not see your response, I found your zip a few hours ago but I did not know what to add in one of the 2 connections that required and I did not continue trying, I will try to change what you said in you latest response to see if it works! thanks!

  • eduardosilvin Profile Picture
    30 on at

    Thanks Victor, 100% right! for other users the flow is like this (working ok): 

    eduardosilvin_0-1700382047079.png

     

    Regards

     

  • RA-21101257-0 Profile Picture
    2 on at
    I have shared the bypass for the count limit as @creativeopinion descriped with my developers and the answer was that this would require a license per user of the app. An expensive solution
     
    Is there a workaround for that?
     
    Thanks and regards
     
    Ron

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 481

#2
11manish Profile Picture

11manish 278

#3
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

Last 30 days Overall leaderboard