Continuing on with my series about Copilot Studio I want to show you something cool. In questions the Copilot asks the user we can presents a option set for the user to choose from. However this list is usually static, such as in my request a day off example. What if we HR adds a leave type option in our HR system? They will probably forget that they have to update the Copilot as well! Let me show you how we can add Dynamic Options to our Copilot.
This post is part of a series of blogpost about Copilot Studio in which I create a HR Copilot and show various options available within Copilot Studio. Here are my other posts about this topic:
- Start of with asking yourself a couple of questions before you build your own Copilot.
- Then connect your Copilot to SharePoint to quickly make your Copilot intelligent.
- Now go ahead and use the build-in Copilot of Copilot Studio to quickly create a custom topic.
- Create dynamic options in a question node by utilizing the JSON function.
- Finish off the topic and learn how to add Rich Media to a message.
Time off types from our HR system
The first thing we want to do is create a Cloud Flow from within Copilot Studio. This ensures that we use the correct Trigger and Return type.

I am not going through building the Cloud Flow to get the meta data from your HR system about leave types. Basically because there are quite a number of HR systems available and it is not the focus of blogpost. Instead I will return a Json structured list as a string to our Copilot topic. We will use this Json string within Copilot later. So look to build the list similar to this formatting when you are building your Cloud Flow that does connect to your HR system.

Don’t be alarmed by the Trigger and Return Action in Power Automate flow. Not every system within Microsoft has gotten the message that Power Virtual Agents has evolved into Copilot Studio. For good measure the json string is as follows:
[
"Holiday Leave",
"Sick Leave",
"Maternity Leave"
]
When we are done creating the flow we go back to Copilot Studio. You will need to refresh the studio to load the latest Power Automate Cloud. Select it and it will automatically put the LeaveTypes return variable into a string.

Grab the string and parse it to a table
Now that we have the string of leave type options from our HR system, we want to utilize them in the Ask a question node. It is not possible to add them to the answers manually. We can however use a table as the options to choose from. The first step is to convert the LeaveTypes string to a table. As this is a json string we can utilize the Parse Value option.

After selecting Parse value you have to choose the variable you want to parse. In our case it’s the LeaveTypes variable the Cloud Flow returned to us.

After which we need to define the Data type we want to parse into. A great feature is that we can provide sample data so the json schema is automatically defined just as in Power Automate!

And afterwards you can see that we now have a table. Which I have called ParsedLeaveTypes

Finishing touches
To finish it off and make our choices dynamic we change the existing question from a “Multiple choice options” to a “Options from a list variable”.

In here we select our ParsedLeaveTypes table variable and we are good to go!

There you have it! Now our Leave Types our employees can choose from are dynamic. One thing to keep in mind though, is making a call each time to your HR system can be costly. For performance it might be a good idea to keep option sets hardcoded. Or grab the data from Dataverse where you can push the changes from the HR system towards. This post is primarily to inspire what is possible.