Usage Of Peek Code In Power Automate

Introduction

In Power Automate, at times we need to write expressions manually, a quick way of doing this is by using Peek code functionality that is present in every action in Power Automate. Especially this Peek code comes to rescue, whenever we are trying to work on actions like Lists, lookup values, Flow trigger conditions Peek code will be useful.

Step 1

Login to the required Power Apps environment using URL make.powerapps.com by providing username and password and click on Flows on the left-hand side as shown in the below figure.

Understand Flow Trigger Condition in Power Automate Figure 1

Step 2

After Step 1, Click on New Flow and select instant cloud flow and provide the trigger as Manually trigger a flow and click on Create as shown in the below figure.

Understand Flow Trigger Condition in Power Automate Figure 2

Step 3

After Step 2, name the flow as Usage of Peek code and take an initialize variable and name it as Initialize variable - Provide 1st User Age as 25  and provide values

Name: User1Age

Type: Integer

Value: 25

as shown in the below figure.

Understand Flow Trigger Condition in Power Automate Figure 3

Step 4

After Step 3, on Initialize variable - Provide 1st User Age as 25 step click on 3 dots and click on peek code as shown in the below figure.

Understand Flow Trigger Condition in Power Automate Figure 4

Step 5

After Step 4, observe the JSON format of the code as shown in the below figure.

Understand Flow Trigger Condition in Power Automate Figure 5

Step 6

After Step 5, take list action and select contacts as table name as shown in the below figure.

Understand Flow Trigger Condition in Power Automate Figure 6

Step 7

After Step 6, now go to the peek code on that step and observe JSON format of the action and get the details of entityname, operationId, etc as shown in the below figure.

Understand Flow Trigger Condition in Power Automate Figure 7

Step 8

After Step 7, now let us see for compose action as shown in the below figure.

Understand Flow Trigger Condition in Power Automate Figure 8

Step 9

After Step 8, see peek code and observe the how input variable User1Age as shown in the below figure.

Understand Flow Trigger Condition in Power Automate Figure 9

Note:

  1. Make sure to save the flow whenever you try expressions.
  2. As many questions came with my previous posts, like how I framed expression in Flow Trigger Condition, I have used this peek code feature that was provided by Microsoft.
  3. I tried to explain for few actions, but for all actions we can see this peek code functionality to understand code behind the scenes.

Conclusion

In this way, we can use peek code in power automate to understand how internal code was generated as JSON.


Similar Articles