Data Operations In Power Automate

Loading

Data operations :

Data operations in Power Automate are used to Manipulate Date when you create Different Flows.

Data Operations Include:

Compose

Create CSV Table

Create HTML Table

Filter Array

Join

Parse JSON

Select

Go To Power automate -> + Create ->Instant Flow -> Flow Name: Data Operations & Choose How To Trigger This Flow : Manually Trigger a Flow

Add a New Step -> Data Operations -> Actions

The Flow will show a list of Data Operations which are available in Power Automate

Compose Data Operation Action :

Compose Action will be used to save yourself from having to enter the same data multiple times as you’re designing a cloud flow.

The Major Advantage with Compose action is The Output will Automatically understand the Data type.

Let’s create a string in the compose action

When we run the Flow Manually

The string will be shown with invited commas “” to identify it as a string

Check the “Show raw Outputs” then we can see our string with invited commas””

Let’s create an Array of numbers in the compose action

When we test the flow the output will be shown as a array of numbers with [] symbol

Initialize Variable :

let’s initialize a variable to use that variable anywhere in the flow and Here i am taking a Data type as Boolean and adding a value Expression as “false”

Note :- Compose can be used as a static variable where we can define it’s value once and it’s will stay as same throughout the flow , But variables are different because we can change them during the run of the flow, To change the value of the particular variables we can use “set Variables” Data Operation in the middle of the flow

Set Variables :

Set function will be used to change the value of the variable which we already initialized before set operation

Here i have changed the value of the variable from false to true

let’s Add a compose action and give the inputs as different Emails/strings in an Array format

To join the above Emails as a single string we can use the join Data Operation where we can add different strings.

Join Data Operation :

This action allow us to Delimit an array with the separator of your choice.

The Join action will ask for two components i.e From : It will ask the for an Array of strings to join and Join With : we can indicate a separator to separate the strings.

Here we can see the mails are separated by “;” semicolon symbol

Let’s create an Array of Objects in an another compose action

Select Data Operations :

This Action Allow us to transform the shape of the objects ,We can Add, Remove, Rename the elements in each objects in an Array

Here i have added the output of above compose action where it includes array of objects to the “From” value & For “Map” option i have given the values by using Expression : item()?[‘Name’] and item()?[‘Data Function’]

The output will perform the Add function and displays the combined strings as shown below

We cannot change number of objects in an Array by using Select action, so to perform that operation we have to use Filter Array

Filter Array Data Operation :

We can filter an Array By using Following actions

Here i have filtered the strings which doesn’t include Power App

Create CSV Table :-

This will Expect an array and it will provide either a “,” separated value table or it will output an HTML Table

change a JSON array input into a comma-separated value (CSV) table. You can keep the headers visible in the CSV output.

In this example, you convert the following array into a CSV table:

Create HTML Table Data Operation :

This will change a JSON array input into an HTML table. You can keep the headers visible in the HTML output

The output will be shown as an HTML Table

Parse JSON Data Operation :

Here i have added content from Outputs of compose action where it includes an Array of objects

Go to “Generate from Sample ” and add our array of objects into this “Schema”

The output of the action will be shown below

The Major Advantage with Parse JSON Is if you add subsequent action like compose and loo the Dynamic content of the Parse JSON it will give you the properties (Name, Image, Data Function) values associated with the JSON objects

When you add any property to the compose action it will automatically creates a Loop as shown Above because the original content of JSON is An Array .

Note : It’s Better to rename every action with respective names so that we can use them anywhere in our flow.

Leave a Reply

Your email address will not be published. Required fields are marked *