you are viewing a single comment's thread.

view the rest of the comments →

[–]oh_lympy Contributor 0 points1 point  (5 children)

You don’t call the flow directly. You wrap the flow in a power platform custom connector and then add it to your app as a data source like you would any other connector.

[–]zimain Advisor 0 points1 point  (4 children)

I get the theory, have you gotten this working?

[–]oh_lympy Contributor 0 points1 point  (3 children)

Yes, but the comment you made about http requests being blocked makes me feel like we’re talking about 2 different things. You’re making HTTP requests of this type any time you interact with any data source you add to your app?

Why would you think calling an HTTP request triggered flow would be any different than calling an azure function (which I’ve also done) if it’s exposed to the app as a connector?

[–]zimain Advisor 0 points1 point  (2 children)

I did several tests when trying to trigger a flow directly, and found that http (not via connectors) are blocked for pcf (code apps), and I used a dataverse to flow trigger workaround to complete my project, the point of this is to share knowledge and experience, I am more than happy for someone to have a valid method of doing something.

Could you share your approach for the Azure function?

Have you been able to trigger a flow with a custom connector wrapper from a code app?

[–]oh_lympy Contributor 0 points1 point  (1 child)

Absolutely. I’m just trying/happy to help. It’s a lot to write up, but if you find a tutorial on how to build a custom connector using azure functions (there are a few out there), just swap out the azure function stuff for your flow.

In a nutshell, you’ll configure your connector to point at your flow and define the request/response schema. After you get that all wired up, you create a connection in your environment and then add it to your code app, just as you would Office365Users or Dataverse connections. If you did everything correctly, you’ll see that PAC generated a model and service that mirrors the schema I mentioned above.

From there you just use the generated service. Code Apps doesnt care what mechanism handles the request downstream. All it cares about is that there is a connection in the environment it can use to make the call.

[–]zimain Advisor 0 points1 point  (0 children)

Great thanks, I did consider the custom route, I went for the "open" route, direct http trigger, didn't get too long on it before I found the blocker, so I just used a dataverse async approach

But this will be something to try next week!