Logic Apps — call an Azure Function
Logic Apps offer a lot of actions which can be used in various ways. Sometimes it isn’t enough and every now and then, there is a need to create custom code and integrate it with a workflow. Or there is code created which can be reused. The easiest way to attain this is placing the code inside an Azure function. Today, I will show you two ways, how to call an Azure function.
The first one is an Azure Functions action. Where you can easily pick a prepared function.
In this case the function is triggered by an Http request.
If you need to provide parameters, then you can add a body. In this case, this body…
{
"isOperationMultiple": "@{variables('isOperationMultiple')}",
"operationId": "@{variables('operationId')}"
}
…is provided as an Outputs variable.
After calling the function we get a response.
The second way of calling a function is to use an Http action.
Where you set the same body. And instead of picking a function there is a Uri value to define.
Like I said. In this case, a body value is the same as in the previous example. And Uri looks like:
https://function-app-name.azurewebsites.net/api/function-name?code=access-key
And here is the result.