Access to this page requires authorization. You can try
.
Access to this page requires authorization. You can try
Data operations allow you to manipulate data as you build your cloud flows. You can use them to create, sort, and rearrange data using shortcuts to help you achieve your results easier and faster, which can save you time and effort. When you use data operations, you can increase the efficiency of your flows, reduce the number of errors, and make it easier to analyze data.
This article explains how you can use data operations such as compose to create a single output from multiple inputs, including expressions. You can also use data operations to join or select data, filter arrays, create tables, and parse JSON. In this article, each section provides a brief description of the data operation, followed by a step-by-step procedure to help you use it in your cloud flow.
Prerequisites
Access to
Power Automate
.
A tool to send HTTP POST requests with a JSON array to your flow.
A new or existing cloud flow to which you can add data operations.
Display a cloud flow in the designer
To use the data operations described in this article, you need to have the designer open with your new or existing cloud flow.
Power Automate allows you to use either the
new designer
or the classic designer to configure your cloud flow. The screenshots in this article use the new designer, but the steps are similar in both designers. Learn more (with examples) in
Identify differences between the new designer and the classic designer
.
Create a new cloud flow
To create a new cloud flow, follow these steps.
Sign in to
Power Automate
.
On the navigation pane to the left, select
Create
.
Select one of the
types of cloud flows
in
Start from Blank
:
Automated cloud flow
,
Instant cloud flow
,
Scheduled cloud flow
, or
Describe it to design it
.
For
Automated cloud flow
,
Instant cloud flow
, and
Scheduled cloud flow
, follow the instructions and select
Create
.
For
Describe it to design it
:
Enter a description of the flow you want to create and select
Submit
, or select from the AI-generated suggested flow descriptions.
If you're satisfied with the suggested flow, select
Keep it and continue
.
Review your connected apps and services, and then select
Create flow
.
The flow opens in the designer.
On the navigation pane to the left, select
My flows
.
In the
Cloud flows
tab, select the flow you want to open.
On the command bar at the top, select
Edit
.
The flow opens in the designer.
Use the compose action
Use the
Data Operation - Compose
action to save yourself from having to enter the same data multiple times as you're designing a cloud flow. In this example, you need to enter an array of digits—
[0,1,2,3,4,5,6,7,8,9]
—several times while you design your flow. You can use the compose action to save the array, as described in the following procedure.
Add the compose action
Display a cloud flow in the designer
.
In your flow, add an action be selecting the plus sign (
+
).
In the
Add an action
search field, typ
compose
.
Under
Data Operation
, select
Compose
.
Close the configuration pane by selecting the left arrows (
<<
) at the top right corner.
To make the
Compose
card easier to find later, rename it by selecting the text
Compose
on the title bar of the card and entering a name that's easy to remember.
Use the outputs from the compose action
Use the contents of the compose action you created in this section in a new action. In this example, you use the outputs from the compose action in a
Data Operation - Join
action. The join action takes an array and joins it into a single string with a separator of your choice.
Display a cloud flow in the designer
.
In your flow, add an action be selecting the plus sign (
+
).
In the
Add an action
search field, type
join
.
Under
Data Operation
, select
Join
.
In the
From
field, select the lightning bolt, and then select the
Outputs
dynamic value.
Outputs
appears in the
From
field.
in the
Join with
field, enter a comma (
,
) or the desired separator.
Close the configuration pane by selecting the left arrows (
<<
) at the top right corner.
Use the join action
Use the
Data Operation - Join
action to delimit an array with the separator of your choice. For example, your flow receives a web request that includes the following array of email addresses:
["d@example.com", "k@example.com", "dal@example.com"]
. However, your email program requires addresses to be formatted in a single string, separated with semicolons. You use the
Data Operation - Join
action to change the comma delimiter (,) to a semicolon (;) by following these steps:
Display a cloud flow in the designer
.
Add a new action, search for
Join
, and then select
Data Operation - Join
.
Use the select action
Use the
Data Operation – Select
action to transform the shape of objects in an array. For example, you can add, remove, or rename elements in each object in an array.
Although you can add or remove elements by using the select action, you can't change the number of objects in the array.
In this example, data enters your flow via a web request in this format:
[ { "first": "Eugenia", "last": "Lopez" }, { "first": "Elizabeth", "last": "Moore" } ]
You want to reshape the incoming data by renaming first to FirstName and last to FamilyName, and adding a new member named FullName that combines first and last (separated with a space).
[ { "FirstName": "Eugenia", "FamilyName": "Lopez", "FullName": "Eugenia Lopez" }, { "FirstName": "Elizabeth", "FamilyName": "Moore", "FullName": "Elizabeth Moore" } ]
To do this:
Display a cloud flow in the designer.
Delete the existing trigger by either right-clicking the trigger and selecting Delete, or by selecting the vertical ellipsis (⋮) in the configuration pane, and then selecting Delete.
Add the When an HTTP request is received trigger to your flow.
Select Use sample payload to generate schema.
In the box that appears, paste a sample of your source data array, and then select Done.
Add the Data Operation – Select action, and then configure it as shown in the following screenshot.
> The output from the select action is an array that contains the newly shaped objects. You can then use this array in any other action, such as the compose action discussed previously.