Power Automate

Power Automate: Actions, Outputs & Body Functions

Power Automate: Actions, Outputs & Body Functions Posted by - Matthew Devaney on - February 2, 2025 2 Comments The Power Automate functions body, actions and...

Matthew Devaney
Published
Reading time
4 min read

Before you start

Is this guide for you?

Best entry point
Power Automate
Time investment
4 min read

Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/power-automate-actions-outputs-body-functions/. Author: Matthew Devaney.

Power Automate: Actions, Outputs & Body Functions Posted by - Matthew Devaney on - February 2, 2025 2 Comments

The Power Automate functions body, actions and outputs allow you to get any inputs & outputs you want from a previous action. These functions are useful because inputs, status codes and headers information do not appear in the dynamic values menu. Once you learn them you will be able to get any data you need to build your Power Automate flows. Table of Contents

Introduction: The Paid Time Off SharePoint List

Actions Function In A Power Automate Flow

Get Input Parameters From A Power Automate Action

Outputs Function In A Power Automate Flow Body Function In A Power Automate Flow

Get Value Property From A Power Automate Action

Introduction: The Paid Time Off SharePoint List

The Power Automate flow we will build to learn the Actions function, Body function & Outputs function uses a SharePoint list named Paid Time Off . TimeOffDate – Date Only

RequestType – Choices [Personal, Vacation, Bereavement, Sick] Status – Single line text EmployeePerson – Person

Populate the SharePoint list with the following data: TimeOffDate RequestType Status EmployeePerson 9/1/2020 Personal Submitted Kelly Smith 9/4/2020 Vacation Approved Kelly Smith 9/5/2020 Bereavement Approved Kelly Smith 9/8/2020 Sick Rejected Jennifer Houston 9/12/2020 Personal Submitted Sarah Green 9/13/2020 Vacation Approved Jennifer Houston 9/15/2020 Personal Rejected Sarah Green

Actions Function In A Power Automate Flow The Power Automate actions function

gets the inputs & outputs for a selected action and returns it as a JSON. It allows us to use and input/outputs properties from a prior action.

Create a new instant flow in Power Apps, add a SharePoint – Get Items action and target the Paid Time Off SharePoint list. Then insert a Compose action and use the actions function to get input/output values from the Get Items action.

Write this Power Automate expression in the Compose action. actions( 'Get_items:_Paid_Time_Off' ) Code language: JavaScript ( javascript )

The Power Automate actions function returns all inputs & outputs from the Get Items action shown below.

The Get Items action is represented as a JSON.

Input Parameters Property From A Power Automate Action

A specific property from the Get Items action can be selected by writing some additional code after the actions function. For example, lets say we want to get the Site Address used as an input to Get Items.

We would write the following Power Automate expression to get the site address from the JSON returned by the actions function .

actions( 'Get_items:_Paid_Time_Off' )?[ 'inputs' ]?[ 'parameters' ]?[ 'dataset' ] Code language: JavaScript ( javascript )

The Compose action outputs field now shows the SharePoint site address.

Outputs Function In A Power Automate Flow

The Power Automate outputs action returns the status code, headers and body for the selected action as a JSON. It is useful because the status code and headers are not included in the dynamic values shown by Power Automate.

Update the Compose action to use the outputs function . outputs( 'Get_items:_Paid_Time_Off' ) Code language: JavaScript ( javascript )

The JSON returned by the outputs action shows the status code headers and body as expected.

If we wanted to get the statusCode we could write an expression like this to return the value 200 .

outputs( 'Get_items:_Paid_Time_Off' )?[ 'statusCode' ] Code language: JavaScript ( javascript ) Body Function In A Power Automate Flow

The Power Automate body function returns the body property from the selected action. Any property found within the body will be automatically shown in the dynamic values selection menu so it is often not necessary to write the body function manually. But it will appear in the dynamic values you have selected.

Change the Compose action to use the body function instead. body(‘Get_items:_Paid_Time_Off’)

The JSON returned by the body function looks like the image below. Notice that the status code and headers we saw when using the outputs function are excluded.

Value Property From A Power Automate Action

When a Power Automate action is used to return a list of items it is usually found in the values property of the body. We can write a Power Automate expression to get these values.

Use this code in the Compose action. The body function targets the Get Items action and the selector gets the list of items in the value property.

body( 'Get_items:_Paid_Time_Off' )?[ 'value' ] Code language: JavaScript ( javascript )

The list of values appears in a JSON format like this: Did You Enjoy This Article? 😺

Subscribe to get new Copilot Studio articles sent to your inbox each week for FREE Enter your email address Sign Me Up Questions?

If you have any questions or feedback about Power Automate: Actions, Outputs & Body Functions please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion. Matthew Devaney Power Automate

Save Docusign Document To SharePoint With Power Automate

Share this

Tagged

Power Automate

Have a Microsoft 365 topic idea?

Share article suggestions, community session ideas, corrections, or real-world scenarios for future nxtM365 learning notes.

Suggest a topic

Keep learning Microsoft 365

Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.

Continue learning

Next action

What to do next

Browse all tutorials →