Search code examples
jsonsharepointpower-automatepowerappspower-automate-desktop

Set string variable to dynamic list column value gives error: Input parameter of operation Set Variable contains invalid expression. PowerAutomate


Simplest of actions.... Had a string type variable Initialized then Set to a string with a bunch of html tags and with dynamic list column value inserted in between.

enter image description here

Flow gives the error upon save "The input parameter(s) of operation 'Set_Email_Body_variable' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Set_Email_Body_variable'."

Tried with

string(outputs('Get_item')?['body/ReferenceNo'])

doesn't budge. will appreciate some quick pointers! Thanks!


Solution

  • Resolved by combining parts of HTML by storing them in different string variables > Initialize Variable Action

    These variables then combined in Compose along with respective dynamic column values using Concat

    concat(variablehtml1, SPCol1, variablehtml2, SPCol2)