Reputation: 16677
I have created several Azure Functions, with custom routes, which from what I understand from the docs https://learn.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.
Just to test, I included an Azure Function with no custom route, and it is visible to Logic Apps.
I attempted to follow the instructions at https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-functions#function-swagger (CORS) and https://learn.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.
Upvotes: 4
Views: 3760
Reputation: 16677
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.
See the docs
Upvotes: 12
Reputation: 15724
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".
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"
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.
Upvotes: 3