My power app button passes one json object among 6 texts, and I wanted to initialize this in power automate. In the power App V2 trigger, I created a text input called varOptionalFields.
I then proceeded to add a initialize variable with the code:
json(triggerBody()?['varOptionalFields'])
Now when running the power App, the json object does get outputed by the power apps trigger as seen by:
{"Beschreibung_2":"test","Beschreibung_3":"tet","Beschreibung_4":"tes","Beschreibung_5":"test","Beschreibung_6":"test","Beschreibung_7":"test"}
But the initialize variable fails and i get this error message:
Action 'Initialize_variable' failed: Unable to process template language expressions in action 'Initialize_variable' inputs at line '0' and column '0': 'The template language function 'json' expects its parameter to be a string or an XML. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#json for usage details.'.