My Digital Garden

Power Automate - Content Types

Power Automate - Content Types

Logic Apps and Power Automate flow data through with the content-type it was received with. Internally data is represented as JSON, with the corollary that data may need to be cast before use.

Converter functions

json() Casts data to application/json
xml() Casts data to application/xml
binary() Casts data to application/octet-stream
string() : Casts data to text/plain
base64() Converts content to a base64 string
base64toString() Converts a base64 encoded string to text/plain
base64toBinary() Converts a base64 encoded string to application/octet-stream
encodeDataUri() Encodes a string as a dataUri byte array
decodeDataUri() Decodes a dataUri into a byte array

See also

Microsoft documentation:

Handle content types in Azure Logic Apps

Various content types can flow through a logic app, for example, JSON, XML, flat files, and binary data.

While Logic Apps supports all content types, some have native support and don't require casting or conversion in your logic apps. Other types might require casting or conversion as necessary. This article describes how Logic Apps handles content types and how you can correctly cast or convert these types when necessary.

page

/