We'd like to trigger a flow from within a model driven app by using code (JavaScript WebResource).
We have used HTTP POST as a trigger for our flow and this works by calling the HTTP POST URL from within our code. But, every time we promote our solution (e.g. from DEV to TEST), our code is broken as the HTTP POST URL of our flow has changed. Is there any other way we can trigger a flow from within code that won't break when promoting solutions? Previously, to manually trigger a Workflow, we could use the WorkflowId that remained consistent between environments.
Hi @Wauters,
Unfortunately this isn't supported yet and haven't found a way to preconfigure the POST URLs beforehand when deploying with CDS solutions. It has been a big pain for us to manage through the different environments especially that we have everything automated in Azure DevOps... Here are a couple of workarounds but are more advanced:
I suggest you submit the idea here and I'll vote: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas
Hope this helps!
You can create a constant.js where urls for each of the env is stored and add a logic that check if the env is dev or prod.
stampcoin
17
mmbr1606
15
Super User 2025 Season 1
ankit_singhal
11
Super User 2025 Season 1