@johnjohnPter
The reason I suggested that you check the number of items is because I read your original post as wanting to check how many items were returned. However, I must have misunderstood your original post.
Did you want to only return a single item from the Get Items action? If so, then you ned to se the Top Count to 1.

However, even if you return a single item from the Get Items action. It will return an Array of items even if you specify to return a single item. Because of that, if you try to use any dynamic content from the Get Items action, it will automatically be nested inside an Apply to Each action.
To avoid the Apply to Each action you'll need to use an expression to get the dynamic content. I cover that in this YT Tutorial: 3 Mistakes YOU 🫵 are Making with the Apply to Each Action in your Microsoft Power Automate Flow
In this video tutorial I’ll go over how to avoid these common mistakes when using the Apply to Each action in a Power Automate flow:
1️⃣ Looping through a Single Item
2️⃣ Creating Unnecessary Nested Loops
3️⃣ Looping through an Unfiltered Array
At the end of the video I share a few helpful insights when it comes to using the Apply to Each action in your flow.
I'll also cover:
✅ How to avoid the Apply to Each action with a single item array
✅ How to use the item() function to access dynamic content in an array
✅ How to prevent unnecessary nested Apply to Each action loops
✅ How to use the Select action
✅ How to convert an array to a string with the Select action
✅How to use the Filter Query field
✅ How to count the number of items in an array
✅ How to use a condition control
✅ How to use the concurrency control
✅ How to set a top count
✅ How to use Compose actions for troubleshooting
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!
|