🔍 Unlock Hidden Power in Power Automate with “Peek Code” – My Favorite Secret Tip

If you’ve ever built a flow in Power Automate and hit a wall trying to reference a deeply nested value, or wondered how to extract that one field that just won’t show up in the Dynamic Content pane — I’ve been there too.

Today, I’m sharing one of my favorite “secret sauce” tips that every serious Power Automate user should know:

💡 Use “Peek Code” to uncover the true structure of your flow and confidently write custom expressions.

This simple, often-overlooked feature has saved me hours of trial-and-error and made my flows cleaner, smarter, and easier to maintain. Let me show you how it works — and why it matters.


🛠️ What Is Peek Code?

Peek Code is a built-in Power Automate feature that lets you look “under the hood” of any action in your flow. Instead of relying on what’s visible in the UI or the limited Dynamic Content menu, you can see the raw JSON definition of an action — including internal names, expressions, and data paths.

Once you know those paths, you can write powerful custom expressions with confidence, such as:

outputs('Get_manager_(V2)')?['body/mobilePhone']


🔧 Real-World Example: Get a Manager’s Mobile Number

Let’s walk through a real use case.

Scenario:

You’re building a flow that:

  1. Triggers when a new SharePoint item is added.
  2. Identifies the person who created the item.
  3. Uses the “Get Manager (V2)” action from Microsoft Entra ID.
  4. Sends the manager a notification — including their mobile number, which isn’t shown in Dynamic Content.

Here’s How to Use Peek Code:

🔹 Step 1: Add “Get manager (V2)”

Feed it the “Created by Email” from the SharePoint trigger.

🔹 Step 2: Add a Compose action to extract the mobile number

But wait… you don’t see mobilePhone in Dynamic Content.

🔹 Step 3: Peek the Code

Click the ••• (three dots) on the “Get manager (V2)” action → choose Peek code.

Here’s what you’ll see:

"body": {
  "displayName": "Priya R",
  "jobTitle": "Head of HR",
  "mobilePhone": "+91-9876543210",
  ...
}

🔹 Step 4: Use the path in an expression

Copy and paste this expression into your Compose action:

outputs('Get_manager_(V2)')?['body/mobilePhone']

🎉 You’ve now extracted a value that wasn’t available in Dynamic Content!


🔁 Bonus: Bypass “Apply to Each” with Smart Expressions

Another huge benefit of Peek Code: navigating arrays without unnecessary loops.

Say you’re using “List rows” from Dataverse or SharePoint. It returns an array called value[]. Power Automate will often wrap everything in an “Apply to each” loop — even if you only need the first record.

Here’s what you can do:

💡 Use Peek Code + first() to simplify:

first(outputs('List_rows')?['body/value'])?['fullname']

✅ Cleaner
✅ More efficient
✅ Easier to debug


📈 Why Peek Code Changed My Flow-Building Life

Here’s what Peek Code helped me with personally:

  • Avoiding frustrating “null” reference errors
  • Accessing deeply nested JSON values
  • Writing expressions that the UI doesn’t support
  • Learning the real names of actions and variables (especially helpful when using Apply to each or parallel branches)

If you’re building complex flows, this is the difference between guesswork and mastery.


🧩 Final Thoughts: The Secret Tool in Your Flowbox

Peek Code is like a developer console for Power Automate — hidden in plain sight. Whether you’re a business user automating emails or a developer orchestrating enterprise systems, this feature gives you precise control over your logic and data.

So next time you’re stuck, before Googling or blindly clicking around, right-click that action and select Peek Code.

You might just solve your problem in seconds.


Would you like a downloadable cheat sheet with common Peek Code expressions for SharePoint, Dataverse, and Power Apps connectors? Let me know — I’m happy to share!

Until next time, happy automating!
— BooNars



Discover more from BooNars

Subscribe to get the latest posts sent to your email.

Leave a comment