Error Logic App: Workflow Parameter not found

I built a Logic App with the following action:
“Email1_-_replace_siteUrl”: {
“type”: “Compose”,
“inputs”: “@replace(actionBody(‘HTTPGetEnquete’),'{{siteUrl}}’,parameters(‘customerSatisfactionSite’))” …

I could successfully deploy the logic app, but on runtime I received the following error:
Unable to process template language expressions in action ‘Email1_-_replace_siteUrl’ inputs at line ‘1’ and column ‘2730’: ‘The workflow parameter ‘customerSatisfactionSite’ is not found.’.

I tried different things like adding square brackets: [parameters(‘customerSatisfactionSite’)]. Like using the string function: string(parameters(‘customerSatisfactionSite’)). But, in either case I received the same runtime error or even couldn’t deploy the logic app in the first place. As a sidenote, it’s not like I can’t use workflow parameters at all. Look at:
“enqueteURL”: {
“type”: “Compose”,
“inputs”: “[concat(parameters(‘customerSatisfactionSite’), ‘/Content/Html/motion10enquete.html’)]”,

Anyways, I couldn’t use workflow parameters in this case. So the next attempt was to use a variable instead of parameter. I added a parameters section via the Logic App code template:
“variables”: {
“customerSatisfactionSite”: parameters(‘customerSatisfactionSite’)

Next I changed the workflow action to:

Unfortunately that didn’t solve my problem as I received the error:
Variable cannot be used as it’s not initialized.

I removed the variables section again and instead added an action InitializeVariable to initialize a variable named siteUrl.
“Init_siteUrl”: {
“type”: “InitializeVariable”,
“inputs”: {
“variables”: [
“name”: “siteUrl”,
“type”: “String”,
“value”: “[parameters(‘customerSatisfactionSite’)]”
] }, …

Next I changed the workflow action Email1_-_replace_siteUrl as follows:

It took me quite some experimenting, but after deploying the logic app, it finally worked.

If you can’t use a workflow parameter because it can’t be found, think of using a variable. Remember that you shouldn’t add a Variables section. Instead use action InitializeVariable.

Leave a Reply

Your email address will not be published. Required fields are marked *