1
votes

I have created several Azure Functions, with custom routes, which from what I understand from the docs https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-functions#prerequisites, they will not appear in the list of Azure Functions for Logic Apps, which they don’t.

enter image description here

Just to test, I included an Azure Function with no custom route, and it is visible to Logic Apps.

enter image description here

I attempted to follow the instructions at https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-functions#function-swagger (CORS) and https://docs.microsoft.com/en-us/azure/azure-functions/functions-openapi-definition (Setup API Management), and still, do not see my Azure Functions from within Logic Apps.

I am sure I am missing something, any assistance would be much appreciated.

2
are they in the same region? same resource group?Thiago Custodio
Yes, same subscription, region and resource group.mattruma

2 Answers

3
votes

I figured out the issue.

You can only see Azure Functions that are Http Triggers that DO NOT have a route defined in the HttpTrigger attribute.

1
votes

According to my test, the tutorial is not complete to implement this requirement. This tutorial just tell us how to generate the openapi definition, but after this operation we still need to do some more steps.

In your function app, click "API Management" under "Platform features" tag and we can find a "Download OpenAPI definition" button, click it to download a swagger file which in json type.

The swagger we download above is just a base file, then you need to do some custom modification in the swagger file according to the request body of your function and upload this swagger file to azure blob storage.

Go to your function app and click "All settings" under "Platform features" tag and then click "API definition". enter image description here enter image description here

Then copy the url of the storage blob(which store the swagger file above) to "API definition location" box.

Now we can find the function in logic app under "Swagger actions" enter image description here

By the way, you can refer to this post which introduce a Nuget to generate the swagger file. And here is a sample about it for your reference.