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.
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.
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.
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.
Step 5
After Step 4, observe the JSON format of the code as shown in the below figure.
Step 6
After Step 5, take list action and select contacts as table name as shown in the below figure.
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.
Step 8
After Step 7, now let us see for compose action as shown in the below figure.
Step 9
After Step 8, see peek code and observe the how input variable User1Age as shown in the below figure.
Note:
- Make sure to save the flow whenever you try expressions.
- 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.
- 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.