Table of Contents

Convert

Converts between objects of different data types, for example string to number or date. You should also use this action if you need to convert JSON, streams, byte arrays, collections or business objects / custom types.

img

Example img
This flow illustrates using the Tools AI Agent to retrieve a list of all blobs in an Azure Storage container and return the result as a JSON string. We then convert the returned JSON string to a business object containing the list of files so we can add it to the table.

The Convert action supports the following conversions:

From type To type
Any built-in .NET Type Any built-in .NET type
Custom type JSON
Anonymous type Custom type
String byte array (byte[])
Stream byte array (byte[])
Object JSON string encoded as UTF8 byte array
String DataTable
IEnumerable DataTable
String Custom type
UTF8 JSON Stream Custom type
UTF8 JSON Stream .NET built-in type
UTF8 JSON string Custom type
UTF8 JSON string .NET built-in type
DataTable Supported collection types for deserialization