Power Automate Create CSV table from Array

Loading

Requirement: Create a CSV table from an array using Power Automate.

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

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

Now, parse the code, so click on the Next step and select Parse JSON action, then in content add the above array variable, and in the schema, generate the below 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"
        ]
    }
}

Now 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.

Now Save and Run the flow

The Output is :

Leave a Reply

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