Power Automate create CSV table custom columns

Loading

Requirement: 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

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

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

Now create parse the 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.

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

Now 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

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

Leave a Reply

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