I always considered myself a pro-developer so I don’t work with Canvas Apps or Powerautomate Flows on a daily basis like all citizen developers but this week I had an interesting experience playing with the “When an action is performed” trigger of the Powerautomate. I learned 2 lessons that I wanted to share with you, my dear subscribers and readers.
Actions vs Custom API
There are 2 ways in Dataverse to define a “custom” action – Action and Custom API. As an old-school developer, I prefer to use something that I used for years and my choice was to use Actions that are part of the system since 2013. Here is an action that I created:
I activated it and used it as a trigger in Flow that I was working on:
I called an action to test it and… nothing happened. I changed the list of inputs assuming that that’s the reason, then recreated an action using “bound” to a table option – nothing could trigger that Flow. That was lesson number one – if you want to trigger the Power Automate Flow calling an action – the “classic” action is not an option – you will have to use Custom API.
Custom API and one non-obvious setting
I created the Custom API as shown in the following screenshot and added the required input properties:
I went to the Power Automate Flow and tried to select this message in the list of messages I was able to hook up to. Custom API I just created didn’t appear in the list. I went the same path trying to recreate Custom API, removed some of the inputs, and then changed the type of “binding” to the “Entity” bound – whatever I did my Custom API refused to appear in the list. I remember for a fact that I used a similar approach around 18 months ago and everything worked fine. I decided to take a closer look at the settings of the Custom API and the answer was there but it wasn’t that obvious – the “Allowed Custom Processing Step Type” setting was set to “None”. I recreated a Custom API with a setting set to “Sync and Async” (because this setting is valid for Create only), refreshed the Flow, and was able to select my new Custom API from the list of available actions. When I called the message of this Custom API from Dataverse it finally reacted on the call and Flow ran. That’s lesson number 2 – when you create a Custom API with the purpose of reacting to it with Power Automate Flow – set “Allowed Custom Processing Step Type” to “Sync and Async”.