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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Flow that counts the number of Emails on a record

(1) ShareShare
ReportReport
Posted on by 37
Good Morning,
 
I need some help recreating a Flow.
I need to create a Flow that counts the number of emails connected to a specific record (Regulatory case in this case).
I have tried using CoPilot and it's not helpful at all.
 
Here is the scenario.
1. Customer sends an email to us and the system creates a record called a "Regulatory Case". The email is attached to the Regulatory Case.
2. A Flow runs, counts the emails on the Regulatory Case (in this case it's only one (1) ) and updates a field called 'Number of Emails on Regulatory Case' to 1.
3. Customer sends a follow up email, the Flow runs again, and updates the 'Number of Emails on Regulatory Case' to 2.
 
Here is what I have so far:
 
 
Then when I try and get the Regulatory Case that the email is attached to, I can't find the unique Id for the Regulatory Case (Red Box). The Red Arrow shows that I am trying to reference the Regulatory Cases Table.
 
 
The Row Id shows that there is no unique id for the Regulatory Case the email is connected to. The Red Arrow shows I was searching for the Regulatory Case but there is no unique id for the Regulatory Case:
 
 
How do I:
1. Get the Regulatory Case the email is connected to.
2. Count the number of emails connected to that Regulatory Case
3. Update the field 'Number of Emails on Regulatory Case' with the count of all the emails on this Regulatory Case.
 
Thank you
Shawn Low
 
I have the same question (0)
  • Verified answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    Hi,
    1. Get the Regulatory Case the email is connected to.
    The Email 'Regarding' column store this case, you can put 'Regarding(Value)' into 'Row ID'.

    2. Count the number of emails connected to that Regulatory Case
    You need use 'List rows' and 'Initialize variable' actions:


    3. Update the field 'Number of Emails on Regulatory Case' with the count of all the emails on this Regulatory Case.


    I hope you can mark my answer verified if it answer your question! If you have any questions, please feel free to contact me.
    Regards,
    Leah
     

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans
Liquid error: parsing "/globalsearch/?q=co+to+jest+alba++krzy%C5%BC%C3%B3wka" - Nested quantifier +.