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.
Thank you very much, I’ve needed this solution for a long time. Additional Quotation Marks added by users in Text Fields were causing issues when bringing the object into an adaptive card. Now I’ve managed to resolve this.
Hey Matthew, it’s great to hear you’ve solved the issue.