I am going to have a quick attempt, though, based on a gamble that your initial condition isn't required, and actually you should be capturing both sets of data anyway.
If this is the case, lemme know and I'll try to give pictorial representation of this.
Before I head down this road, if you can work out how to put your accurate / inaccurate calculations into a single ODATA filter on the incoming excel Get rows action, then you could do TWO excel Get rows one for each (and follow some of the logic below).
At the start of your flow initialise two integer variables, and one boolean, I'll use example names, you name them whatever you like, just call them right later 😉:
- accurateCountVAR (integer)
- inaccurateCountVAR (integer)
- emailUserVAR (boolean)
You won't be needing that Apply to each, here, either, as the Filter does that work.
However you're working out what is accurate/inaccurate needs to be used to power two separate branches (not a condition) after the Parse JSON action. Now, in each branch, create a Filter actions after the Parse JSON to create the separate arrays of items.
- Accurate branch - Filter for accurate answers
- Inaccurate branch - Filter for inaccurate answers
Filters are good for powering conditions, which we will now do. For each branch, and after each filter place a Set variable action, with accurateCountVAR in the accurate branch, and inaccurateCountVAR in the inaccurate one.
Inside each variable you'll need an expression to count the items in the filtered data. So here use the length() function. Then click in the brackets (parentheses) of that length() and select the filter body of the filter above it in the branch.
After setting the variable in each branch place a condition. I'll use the inaccurate branch for an example here:
inaccurateCountVAR greater than 0
In the Yes branch of this set the emailUserVAR to true, then create the CSV from the inaccurate filter above.
Now you're nearly at the end of your flow, you just have two branches with nothing to bridge them at the end!
Click the 'New step' button at the very bottom of the flow screen, and put one last condition in there. This time the condition is on:
emailUserVAR equals true
In the Yes branch here you can send your email, and leave the No branch blank. This way you can do whatever you like after the condition. 🙂