5

We are utilising visual studio 2017 and azure precompiled functions in VB.NET. All functions run successfully locally using the func.exe CLI tool. We can publish the Function App to Azure where we can see and test within the portal.

The problem exists when we try to use the functions as part of a logic app. We can add an action selecting Azure Functions and can see our function app, but none of the underlying functions are available/missing.

What am i missing?

Edit I am using http triggers and web hooks.

Edit It was indeed the custom routes

Thomas
  • 24,234
  • 6
  • 81
  • 125
Dooie
  • 1,649
  • 7
  • 30
  • 47

3 Answers3

8

I had a similar issue with logic app. some of my HttpTrigger functions worked fine and others not. I figured out that the only difference was the routing. functions that used custom routes did not show up in the logic app action selector. I've just removed the custom routes and everything work fines.

I've openned an issue here :

**EDIT: ** Here is the answer from the Azure Team:

This is by design. As Functions with routes as the way the Azure Function is invoked from Logic Apps is via calling an API "list invoke URL." That URL will look something like https://function.azurewebsites.net/api/my/{custom}/route?code=123 and Logic App doesn't have a way to parse the route template. In other words we don't know what is static, and what should be replaced, and don't have a way to "replace" that with the native action.

You can get around it by providing an OpenAPI definition for the function and we will render the card based on the path parameters specified in swagger. Can also not use route if need to show in Logic Apps.

Thomas
  • 24,234
  • 6
  • 81
  • 125
3

Only functions of type 'Generic Web Hooks' are supported by Logic Apps. You don't state what type you are using, but if you are using 'http trigger' functions, that could be the problem.

David Ebbo
  • 42,443
  • 8
  • 103
  • 117
  • 1
    HttpTriggers works fine with logic app, the only problem that I've seen is when you try to do some custom routes. – Thomas Dec 08 '17 at 05:26
  • @Thomas it was indeed the custom routes causing the issue. – Dooie Dec 08 '17 at 15:17
  • Great! @Thomas, can you add an answer with that so it can be accepted? – David Ebbo Dec 08 '17 at 15:19
  • @DavidEbbo do you know where I can open an issue ? did not really know if there is an official github project – Thomas Dec 09 '17 at 05:23
  • @Thomas for functions, you can start with https://github.com/Azure/azure-functions/issues (it's sort of a meta repo). – David Ebbo Dec 09 '17 at 05:36
  • Do we know why the routes break the functions when consuming them in logic apps? – Dooie Dec 09 '17 at 13:50
  • I guess it is the way logic app discovers functions. Having custom routes does not allow logic apps to discover fucntions. – Thomas Dec 09 '17 at 21:12
0

In javascript functions a need to remove route section from function.json

enter image description here

So, i can add this function from Logic Apps Designer

Marbin274
  • 389
  • 3
  • 8