In this example, we will convert a CSV file to JSON in Microsoft Power Automate. You can follow the same steps if you are using Azure Logic Apps.
Our first step in setting up our flow is getting the contents of a CSV file from Azure Blob (this could be retrieved many other possible file sources as well, such as OneDrive, SharePoint, Box, Google Drive, etc.). Then, we will pass the contents of this file into the Cloudmersive conversion connector with the “Convert CSV to JSON” action. If you are new to using one of our API Keys in Power Automate or Azure Logic Apps, you will be prompted to insert your API Key and a Connector Name. Once this has been completed, we will pass in the desired file name. Finally, we will create a new file in your preferred file drive and store the output from the Cloudmersive connector into this output file.
Note that due to an issue in how Power Automate handles types, to reference the JSON output of the Cloudmersive connector we need to use the Expression (as shown in the screenshot):
Binary(body('Convert_CSV_to_JSON_conversion'))
First, let's setup our flow:
Now, let's run our flow. Below, you will see the result:
Now, you have an easy to use template for converting your CSV files to JSON in Power Automate!