Power Automate: Navigating JSON Outputs
1. triggerOutputs()
Access the entire JSON payload from the trigger.
Syntax: triggerOutputs()?['body/FieldName']
Example: triggerOutputs()?['body/Email']
2. triggerBody()
Shortcut to the trigger's body.
Example: triggerBody()?['Name']
3. outputs('ActionName')
Access outputs from a specific step.
Example: outputs('Get_items')?['body/value'][0]?['Title']
4. body('ActionName')
Shortcut to outputs('ActionName')?['body'].
Example: body('Get_user_profile_(V2)')?['mail']
5. items('Apply_to_each')
Use inside loops to get current item.
Example: items('Apply_to_each')?['Project Name']
6. item()
Shortcut for current item inside a loop.
Example: item()?['Status']
7. variables('VariableName')
Access variable values.
Example: variables('MissingFields')
8. Accessing Nested JSON
Navigate through nested fields.
Example: outputs('Parse_JSON')?['body']?['project']?['name']
9. Working with Arrays (value)
Use 'value' to access array items.
Example: body('List_rows_present_in_a_table')?['value'][0]?['Email']
Power Automate: Navigating JSON Outputs
Bonus: length()
Use to get item count.
Example: length(body('Get_items')?['value'])
Best Practices
- Use ? to avoid null errors
- Rename steps clearly
- Use Peek Code to view actual JSON