Recently, I was working with JSON strings in Power Automate. Here, we need to convert JSON to a custom object in Power Automate. In this tutorial, I will explain how to convert JSON to a custom object in Power Automate Desktop.
If you are new to Power Automate desktop, you should know the steps to install Power Automate Desktop, and you can check some Power Automate Desktop examples.
Power Automate Desktop: Convert JSON to a Custom Object
You can convert JSON strings to a custom object by using the Convert JSON to custom object action in Power Automate desktop.
A custom object is a pair of properties and values that can be easily converted into JSON format. You can see here an example:
Custom Object Structure: %{ 'Property1': 'Value1', 'Property2': 'Value2', 'Property3': 'Value2' }%Suppose I have a User Profile Information in a JSON string. I wanted to convert this json into a custom object using Power Automate Desktop. Look at the code below.
{
"user": {
"username": "janesmith",
"email": "[email protected]",
"address": {
"city": "London",
"zip": "E1 6AN"
}
}
}Here are the steps to do this:
- Open your Power Automate desktop app, + New drop-down, and add a Flow. In the Create a flow dialogue box, provide a flow name, and click on the “Create” button.

Next, add the JSON to a variable.
- From the Actions pane, search for the “Set variable” action and drag and drop it into the workspace. Set the variable value and click on the Save button.
- Variable: You can rename the variable produced if you wish. I have renamed it to UserDetails.
- Value: Provide the JSON value here.

- Below that, add the “Convert JSON to custom object” action, which will convert the json string to a custom object directly.
- JSON: Click on {X} -> Select UserDetails variable.
This action will produce the JSONAsCustomObject variable. You can rename it according to your JSON string.

- Now, the custom object has been created. I wanted to retrieve a user’s email from the custom object.
- To achieve this, drag and drop a “Display message” action. Configure the parameters below. Click on the Save button to save the action.
- Message box title: Provide a title for the message box.
- Message to display: Click on {x} -> Select variable from Convert JSON to custom object. Within brackets, provide the key along with the value that you want to get.
- Message box icon: Select the Information option as an icon.
Here, I want to get an email from the User information, so that the expression will be [‘user’][’email’].
Message to display: %UserAsCustomObject['user']['email']%
- Now, the flow is ready. Click on the Save icon. Then run the flow by clicking the Run button.

- After the flow execution is complete, you can view the output below.
Output: Custom Object

Output: Extracted value from Custom Object [Email]

This way, you can convert JSON to a custom object in Power Automate desktop flow.
In this tutorial, I explained how to convert JSON to a custom object in Power Automate Desktop. I hope you found this Power Automate Desktop tutorial helpful.
Also, you may like the following tutorials:
- Power Automate Set Variable
- Extract Tables from a PDF PAD
- Convert a String Decimal Power Automate
- Convert HTML to PDF in Power Automate
- How to Schedule Power Automate Desktop Flows?

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.