The List Management feature in Microsoft Copilot Studio is designed to help you work with data objects — retrieving, modifying, and synchronizing them with external sources.

What Is List Management

List management involves handling collections of data (objects). For example, imagine you have a dataset that contains a list of countries that have won gold, silver, and bronze medals in the Olympics. If your dataset includes three countries and you want to add another one, you can dynamically do this using list management.

Another example is a ticketing system. If your application stores a set of tickets and a new ticket is created through Copilot Studio, you can add that record to the internal list and later synchronize the updated list with your backend system.

In short, list management allows you to retrieve, modify, add, or delete items in a list, or even clear the entire list when needed.

Setting Up an Agent for List Management

To demonstrate, create a simple agent in Copilot Studio (available at copilotstudio.microsoft.com). This agent does not have any pre-configured instructions — it’s a blank template for experimentation.

In the Topics section, create a new topic, for example List Management.
Set the trigger so that the topic runs when the user types list.

Now, go to Variable Management → List Management. Here, you will find the following actions:

  • Modify the list — modify list contents;

  • Skip to item in the list — jump to a specific item;

  • End loop — end a loop;

  • Loop through list — iterate through items in a list.

Let’s focus on Modify list, which allows you to perform direct operations on list data.

Working with Variables and JSON

  1. Create a variable.
    In Variable Management, create a variable (e.g., var1) and paste your JSON data — this will be your dataset (for example, a list of countries and the number of medals they’ve won).

  2. Parse the JSON data.
    The JSON must be parsed so that Copilot Studio recognizes the structure. Choose Parse value, specify the data type, paste a sample JSON, and the system will automatically detect the schema.

  3. Create a second variable.
    After parsing, create another variable (e.g., var2) that now represents a table of records.

Examples of List Operations

Retrieve the First Item

In List Management, select Modify list, then choose the action Take first item.
Save the result as var3, which represents a single record.

You can then send a message with the value of var3.country to display the name of the first country in the list.
For example, if the first record is United States, that’s what will appear.

Retrieve the Last Item

To get the last record, choose Take last item, save it as var3, and test it again.
Copilot Studio will then show the country that appears last in the list (for example, Netherlands).

Adding and Removing Items

Adding an Item

When you choose Add item, you must specify the record to add. You can insert a JSON object or a variable that contains the new record. If the structure is correct, Copilot Studio will successfully add it to the dataset (var2).

Removing an Item

The Remove item action allows you to delete a specific record from the list. You can define which item to remove by selecting a variable or setting a condition.

Clearing the List

The Clear all items command deletes all elements from the list, leaving it empty. After running this action, your dataset will be completely cleared.

Conclusion

The List Management feature in Microsoft Copilot Studio offers powerful tools for working with dynamic data collections. The main actions include:

  • Add item — insert a new record;

  • Remove item — delete an existing record;

  • Take first item / Take last item — extract specific entries;

  • Clear all items — reset the list completely.

These tools make it easy to manage, modify, and synchronize dynamic datasets directly within Copilot Studio, providing flexibility for automation and backend integration.