Getting Started with JSON in Power Automate

After working at Geek Squad for a while, I realized a lot of tasks could be automated. My mindset has always been that many processes can be made more efficient with the right systems in place. Enter Power Automate.

Since Best Buy operates in an enterprise environment, I can’t automate everything I want, but I can leverage Microsoft Apps that the company provides. Power Automate lets you build workflows using other Microsoft tools like Outlook, Excel, and Forms—making automation more accessible without needing custom code.

One of my first challenges involved generating a JSON object, but I couldn't find an easy way to do it—until I came across this fantastic guide by Luise Freese.

Step 1: Using the Select Action

To build a JSON object in Power Automate, start by creating a Select action. This step allows you to define the keys for your JSON object. JSON is structured using key-value pairs, so a simple example might look like this:

{
	"userId": "j6iixd8aa2i5a2jibg7viq5u",
	"id": "jlkb4g8hd7xwl77tp3np76m6",
	"content": "Hello world, this is what JSON looks like."
}

JSON is the language of servers and applications, making it crucial for interoperability between different services, APIs, and automation tools. While Power Automate is a no-code tool, working with JSON effectively elevates it to low-code capabilities, giving you much more flexibility.

Handling Arrays

One key aspect of JSON is handling arrays—lists of items structured in a specific format. A basic array looks like this:

[{"Key": ""}]

Once you define your structure in Select, you can map data to each key. By default, this generates a single object, but if you need multiple objects (like a list of users or tasks), you may need to tweak your flow accordingly.


Step 2: Using the Compose Action

Next, create a Compose action. This step is essential because it transforms the output from Select into a usable JSON object.

In the Inputs field, enter:

body('Select')[0]

This tells Power Automate to return a single JSON object instead of an array of objects. From here, you can pass this JSON into Power Automate’s built-in HTTP request component to communicate with external servers, APIs, or other applications.

Mastering JSON in Power Automate unlocks powerful integrations and automation possibilities—especially when your company’s tools don’t offer built-in solutions. Whether you're working with APIs, automating reports, or building dynamic workflows, understanding JSON can take your Power Automate skills to the next level.

Now that you know how to structure JSON in Power Automate, what will you automate next? 🚀