Power Automate Create a CSV Table [7 Examples]

In this Power Automate tutorial, we will learn Power automate create a CSV table. We will see different examples of how to create a CSV table in Power Automate. And also we will discuss the below points:

  • Power automate create CSV table
  • How to create CSV table from JSON in Power Automate
  • How to create CSV table from SharePoint list in Power Automate
  • Power automate create CSV table from an array
  • Power automate create CSV table custom columns
  • How to create CSV table from excel file in Microsoft flow or Power Automate
  • Power automate create CSV table CSV file

Power automate create a CSV table

Here we will see how to create a CSV table using Power Automate.

In Power Automate, select the Manually triggered flow, then click on the Next step.

Power automate create a CSV table action
Power automate create a CSV table action

Select the Initialize variable action, then provide the variable name, type as an array, and in value write the below sample value.

Power automate create a CSV table
Power automate create a CSV table

Now we will create a CSV table, so click on the next and select Create CSV table action. Then provide in From field the variable from dynamic content and in column fieldset Automatic.

Microsoft Flow create a CSV table
Microsoft Flow create a CSV table

Now click on Save and run the flow you can see the result in the output of Create table action.

how power automate create csv table
how power automate create csv table

This is an example of Power Automate create a CSV table.

Read How to update SharePoint Multiselect column in Power Automate

Power automate create CSV table from JSON

Here we will see how to create a CSV file from JSON using Power Automate.

Now we will create a flow that will create a file from the below JSON data.

{

  "base": "EUR",
  "date": "2021-09-16",
  "rates": {
    "MYN": 24.1678,
    "HRF": 356.500528,
    "MYR": 5.880332
  }
}

And we expect a CSV table like below.

Base, date, fromCurrency, exchange rate

EUR,2021-09-16,”MXN”, 24.1678

EUR,2021-09-16,”HUF”, 356.500528

EUR,2021-09-16, “MYR”, 5.880332

Let’s see how Power Automate creates a CSV table from JSON.

In Power Automate, select the Manually triggered Flow, then click on Next step.

Power automate create csv table action 1

Select Initialize variable action, then provide the variable name, and type as a string.

MS flow json to csv
MS flow JSON to CSV

Next, we will initialize another variable to store JSON data, so click on the Next step and select Initialize variable action. Then provide the variable name, type as a string, and in value above JSON code.

Microsoft  flow json to csv
Microsoft flow JSON to CSV

Now we will parse the above code, so click on the next step and select Parse JSON action. Then in the Content field select the JSON variable from dynamic content. Then you can generate the schema like below:

{
    "type": "object",
    "properties": {
        "base": {
            "type": "string"
        },
        "date": {
            "type": "string"
        },
        "rates": {
            "type": "object",
            "properties": {
                "MYN": {
                    "type": "number"
                },
                "HRF": {
                    "type": "number"
                },
                "MYR": {
                    "type": "number"
                }
            }
        }
    }
}
power automate create csv table from json
power automate create CSV table from JSON

Now we will append the header to the CSV table, so click on the Next step and select Append string variable action, then provide the variable name as CSVData, and in value write the below.

Microsoft Flow create csv table from json
Microsoft Flow create csv table from json

In the next step, we will add the row for MYN, so click on the Next step and select Append the string variable. Then provide the variable name, and in value write the below value.

MS Flow create csv table from json
MS Flow create csv table from json

Now we will append the row to the CSV table for HRF, so click on the Next step and select Append to a string variable. Then provide the variable name as CSV data, and write the value.

How MS Flow create csv table from json
How MS Flow create CSV table from JSON

Now we will append another row, so click on the next step and select Append to a string variable, then provide the variable name and add the value like below.

How to create csv table from json using MS Flow
How to create CSV table from JSON using MS Flow

Now we will create a CSV file in the SharePoint library, so click on the Next step and select Create file action. Then provide the site address, folder path, file name with CSV extension and provide the file content.

How to create csv table from json using Microsoft Flow
How to create CSV table from JSON using Microsoft Flow

Now click on save and run the flow manually, you can see in the SharePoint document library a CSV file is created.

How to create csv table from json using Power Automate
How to create CSV table from JSON using Power Automate

Now open that CSV file, and you can see data get created.

create csv table from json using Power Automate
create CSV table from JSON using Power Automate

This is an example of Power Automate create a CSV table from JSON.

See also  Power BI DAX SUM and SUMX function - How to use

Read Power Automate Create File

Power automate create CSV table from SharePoint list

Here we will see how to create a CSV table from SharePoint List using Power Automate.

So here we have a SharePoint list called Project Management list, and by using the item we will create a CSV table.

power automate create csv table from SharePoint list
power automate create CSV table from SharePoint list

In Power Automate, select the Manually triggered Flow and then click on the Next step.

Microsoft Flow create csv table from SharePoint list
Microsoft Flow create CSV table from SharePoint list

Now get the items from the SharePoint list, so click on the Next step and select Get Items action. Then provide the site address and list name and also set the Top count as 100 as per requirement.

How power automate create csv table from SharePoint list
How power automate create CSV table from SharePoint list

To create a CSV table, click on the Next step and select Create CSV table action. Then in From select the value from the dynamic content, and in column change the Automatic to custom, then map the value from the dynamic content.

MS Flow create csv table from SharePoint list
MS Flow create CSV table from the SharePoint list

Now click on Save and run the flow manually to see the result in the output of create CSV table.

How MS Flow create csv table from SharePoint list
How MS Flow create csv table from SharePoint list

This is an example of MS Flow creating a CSV table from the SharePoint list.

Read How to call a flow from another flow in Power Automate

Power Automate create csv table from array

Here we will see creating a CSV table from an array using Power Automate.

In Power Automate, select the Manually triggered Flow, then click on the Next step.

MS Flow create csv table from array
MS Flow create a CSV table from an array

Select Initialize variable action, then provide the variable name, type as Array, and in value field write the sample value.

MS Flow create csv table from array
MS Flow create CSV table from an array

Now, we will parse the above code, so click on the Next step and select Parse JSON action, then in content add the above array variable, and in the schema, we will generate the below schema.

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "First Name": {
                "type": "string"
            },
            "Last Name": {
                "type": "string"
            },
            "Department": {
                "type": "string"
            },
            "Hire Date": {
                "type": "string"
            },
            "HireDate": {
                "type": "string"
            }
        },
        "required": [
            "First Name",
            "Last Name",
            "Department"
        ]
    }
}
Microsoft Flow create csv table from array
Microsoft Flow create CSV table from an array

Now we will create the CSV table, so click on the Next step and select Create CSV table action. Then in From add the body of the parse JSON from the dynamic content and in columns select the Automatic.

power automate create csv table from array
power automate create csv table from array

This is an example of Power Automate creating a CSV table from an array.

Read Power Automate Set Variable

Power Automate create CSV table custom columns

Here we will see how to create a CSV table custom columns using Power Automate.

In Power Automate, select the Manually triggered flow, then click on the Next step.

Power Automate create CSV table custom columns
Power Automate create CSV table custom columns

Select Initialize variable action, then provide the variable name, type as Array, and in value write the below sample value.

[
{ 
"First Name":"Michel",
"Last Name":"Watson",
"Department":"IT",
"Hire Date":"11-10-2021"
},
{
"First Name":"John",
"Last Name":"Stwert",
"Department":"Finance",
"HireDate":"12-10-2021"
}
]
How Power Automate create CSV table custom columns
How Power Automate create CSV table custom columns

Now we will create parse the above code to get the data, so click on the Next step and select Parse JSON action, then in content add the output of the above step from dynamic content, and then in Schema, add the below sample schema.

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "First Name": {
                "type": "string"
            },
            "Last Name": {
                "type": "string"
            },
            "Department": {
                "type": "string"
            },
            "Hire Date": {
                "type": "string"
            },
            "HireDate": {
                "type": "string"
            }
        },
        "required": [
            "First Name",
            "Last Name",
            "Department"
        ]
    }
}
MS Flow create CSV table custom columns
MS Flow create CSV table custom columns

Now we will create a CSV table using custom columns, so click on the Next step and select Create CSV table action. Then in From field, select the body from the dynamic content. Then in the columns field change the Automatic to Custom from the option. Next map the custom header with the parse JSON value.

Microsoft Flow create CSV table custom columns
Microsoft Flow create CSV table custom columns

Now click on Save and run the Flow manually, you can see the CSV table in the output of Create CSV table.

create CSV table custom columns using Microsoft Flow
create CSV table custom columns using Microsoft Flow

This is an example of Power Automate Create CSV table custom columns.

See also  Power Apps Gallery Patch [With Various Examples]

Read Power Automate wait timer

Power Automate create CSV table CSV file

Here we will see how Power Automate creates a CSV table and then creates a CSV file using Power Automate.

In this example, we will use the SharePoint list called Project Management list. We will use this list to create a CSV file.

power automate create csv table csv file
Power Automate create CSV table csv file

In Power Automate, select the Manually triggered Flow, then click on the Next step.

How power automate create csv table csv file
How power automate create CSV table CSV file

Select, Get items action, then provide site address, List name, and Top count as 100.

Microsoft Flow create csv table csv file
Microsoft Flow create csv table csv file

Now we will create a CSV table with the custom columns, so click on the next step and select Create CSV table action, then in From field select the value from dynamic content. And select column as custom, then map the custom header with SharePoint column value.

MS Flow create csv table csv file
MS Flow create csv table csv file

Now we will create a CSV file in the SharePoint library, so click on the Next step and select Create File action. Then Provide the site address, folder path, file name, and in the file content add the output from the dynamic content.

How MS Flow create csv table csv file
How MS Flow create csv table csv file

Now click on Save and run the Flow manually, you can see a file created in the SharePoint library.

Microsoft Flow create csv table csv file
Microsoft Flow create csv table csv file

And open this CSV file, you can see the data you have created.

How to create csv table custom column using Microsoft Flow
How to create csv table custom column using Microsoft Flow

This is an example of Power Automate creating a CSV table CSV file.

Read Power Automate update SharePoint list increment integer field

Power automate create CSV table from excel file

Here we will see how to create a CSV table from an excel file using Power Automate.

I have an excel sheet called the Product review excel sheet, which we will use to create a CSV table. If your excel sheet is on a local desktop, then upload it into

MS Flow create csv table from excel file
MS Flow create csv table from excel file

In Power Automate, select the Manually triggered Flow, then click on the Next step.

Microsoft Flow create csv table from excel file
Microsoft Flow create csv table from excel file

To get the excel data, select List rows present in a table action, then provide Location, Document Library, File, and table in excel sheet.

Power automate create csv table from excel file
Power automate create csv table from excel file

Now we will create a CSV table, click on the Next step, and select Create CSV table. Then in From select value from the above step, from the dynamic content. Then in columns select Automatic and also you can custom the column.

How power automate create csv table from excel file
How power automate create csv table from excel file

Now click on Save and run the Flow, you can see the output in the create CSV table.

How Microsoft Flow create csv table from excel file
How Microsoft Flow create CSV table from an excel file

This is an example of Power Automate creating a CSV table from an excel file.

Create a CSV table with custom columns using Power Automate

Initially, we will get items from the SharePoint list, and then we will create a CSV (Comma Separated Values)table with custom columns using Microsoft Flow.

In this example, we will use the below List:

  • Conference Room â€“ default Title column
  • Reservation Date – Date Type
  • Reserved by â€“ Person or Choice Type
  • Seating Capacity â€“ Choice Type
  • Contact Number â€“ Number Type
create CSV table custom columns using Power Automate

Let us see how to create a CSV table with custom columns using Power Automate flow.

Step:1

Create an instant cloud flow, enter the flow name, select the manually trigger a flow action, and click the create button.

How to create CSV table custom columns using Power Automate

Step:2

  • Add the +New step and then select get items action from action triggers to get all the items from the SharePoint list.
  • Configure the SharePoint site address and List name. Here I have selected my list name (Conference Room Reservation).
create CSV table custom columns using Power Automate flow

Step:3

  • Select and add, create a CSV table from action, and expand the Show advanced options. In the column section, choose Custom column values.
  • Under the Header field, pass the column header values, and in the values field, then map the value from the dynamic content.
Example to create CSV table custom columns using Power Automate flow

Step:4

See also  How to use Power Apps List box control?

Now click on Save and run the flow manually by selecting the run flow option. Once the flow ran successfully. We can see that the CSV table has been generated in the CSV table output section.

Example to create CSV table custom columns using Power Automate

This is how to create a CSV table with custom columns using Power Automate flow.

Create CSV table from JSON using Power Automate

In this Power Automate article, we will learn how to create a CSV table from JSON using the Power Automate flow.

Scenario:

Here we are going to trigger the flow manually and request the user to Upload a JSON data file. The JSON file that I’m going to use in this example, contains all the Customer Details like:

  • Name
  • CustomerCode
  • CustomerLocation
  • ContactNumber

My Customer Details JSON file consists of below JSON data values:

{
  "Customers": [
    {
      "Name": "Richard",
      "CustomerCode": "58244",
      "CustomerLocation": "France",
      "ContactNumber": 7894561230
    },
    {
      "Name": "Noah",
      "CustomerCode": "14789",
      "CustomerLocation": "Mexico",
      "ContactNumber": 8456789620
    },
    {
      "Name": "Jordan",
      "CustomerCode": "21456",
      "CustomerLocation": "Germany",
      "ContactNumber": 7584963210
    },
    {
      "Name": "Rufus",
      "CustomerCode": "25896",
      "CustomerLocation": "Canada",
      "ContactNumber": 8457962130
    },
    {
      "Name": "Rachel",
      "CustomerCode": "19835",
      "CustomerLocation": "USA",
      "ContactNumber": 8302165479
    }
  ]
}

Follow the below steps to create a CSV table from a JSON file using Power Automate flow.

Create CSV table from JSON using Power Automate

Let us see the steps to create a CSV table from JSON using Microsoft Flow.

Step-1:

Create an instant cloud flow that triggers manually. Expand the Trigger and add File content as input.

Create CSV table from JSON using Power Automate

Step-2:

Add a Compose action and then pass the below expression to read the file content value.

base64ToString(triggerBody()['file']['contentBytes'])
Create CSV table from JSON using Power Automate flow

Step-3:

  • Select +New step and choose Parse JSON action from the action triggers, and pass the Outputs of the Compose action in Content as highlighted below:
  • Pass the sample JSON object value and choose Done in the Schema section. It will automatically generate the JSON schema as below:
Example to Create CSV table from JSON using Power Automate

Step-4:

  • Select and add, create a CSV table from action, and expand the Show advanced options. In the column section, choose Custom column values.
  • Under the Header field, pass the column header values, and in the values field, then map the value from the dynamic content.
Example to Create CSV table from JSON using Power Automate flow

Step-5:
Now Upload the JSON file and run the flow manually by selecting the run flow option.

How to Create CSV table from JSON using Power Automate

Once the flow ran successfully. We can see that the CSV table has been generated in the CSV table output section.

How to Create CSV table from JSON using Power Automate flow

This is how to create a CSV table from JSON using the Power Automate flow.

In this Power Automate article, we learned how to create a CSV table from JSON using the Power Automate flow.

Related Power Automate tutorials:

In this Power Automate tutorial, we will discuss Power Automate creating a CSV table. And also discuss the below points:

  • Power automate create CSV table from JSON
  • Power automate create CSV table from SharePoint list
  • Power automate create CSV table from an array
  • Power automate create CSV table custom columns
  • Power automate create CSV table from excel file
  • Power automate create CSV table CSV file
  • Hi, I’m new to Power Automate and I have a project to create a CSV table from an excel file. I was able to do it, but my issue is that I’d like one of the header title to actually get populated in each row of column. For example; I have 3 column: ID, Code, Amount. I have IDs of the employee ID in the first column, second column I would like pay code Expenses in each row, third column will be the amount. Currently, Expenses sits as header and amounts are in the Expense column. Please help. Thanks.

  • >