The Power Platform provides immense flexibility in connecting apps and automating workflows with APIs. A common scenario is using a Canvas App to trigger a Power Automate flow, which in turn, uses the HTTP connector to interact with external APIs.
However, when working with JSON in Power Apps, especially when the JSON is created by using formulas or concatenating strings, you may occasionally encounter unexpected behavior, such as the introduction of line breaks.
In this post, I will walk through a practical solution for handling this issue using the Power FX Substitute function to generate clean JSON string and prevent line breaks from causing API call failures.