Microsoft Power Automate is a low-code process automation tool that uses drag-and-drop tools to automate critical processes for your business. However, to give you better control over your processes, you can use the Peek Code feature. In this article, we will try to get an idea about the feature and how you can use it to edit a condition within a flow.
In Power Automate, “Peek code” (also known as code view) allows you to see the underlying JSON representation of a flow’s actions and triggers. This feature is helpful for understanding the structure and configuration of your flows and their actions, as it displays the code that Power Automate is generating to automate your workflow.
Here is the step-by-step process that you need to follow to edit flows with the help of the Peek Code feature:
STEP 1: Open the flow you want to edit in Power Automate
STEP 2: Find the condition action you want to edit.
STEP 3: Click on the ellipsis (…) on the condition action
STEP 4: You will get the option to select Peek Code. Click on it.
You will get a small panel that shows the JSON for that condition.
STEP 5: The Peek Code panel will have fields like:
“left” and “right” – which compare the two values.
“operator” – the type of comparison.
STEP 6: Edit the values directly as required.
STEP 7: After you are done editing, simply close the peek code. Your changes will be saved automatically.
An Example of a Condition Within Peek Code
{
"inputs": {
"conditions":[
{
"left": "@triggerBody()?['Amount']",
"operator": "greater",
"right":1000
}
]
}
}
Please make sure that you make the edits correctly, as a single typo can break the entire flow. For large complex flows, this would mean spending hours debugging. A smart idea will be to save the flow before you make the changes.
If you are dealing with complicated edits, or want to customize the flow, but you don’t know how, it is always better to contact the experts. Get in touch with our Power Automate consultants and find the right solution to your challenges.