I have an API workflow with a ‘Return Data from API’ action which returns a Key (parameter) of an specific data type.
I am trying to assign the returned data object into a custom state (of the same type) but I am getting an error that the returned data is a Text even though I haven’t ticked the ‘Return a plan Text’ box.
any ideas or samples on a similar implementation of this action?
Can you share a screenshot? The bug is that you should not be able to use a return data from API action on a page, so using a ‘set state’ action after does not make sense.
Right, if you look at the second screenshot you’ll see the step 1 is ‘schedule API…’ which returns a scheduled ID, not the data returned by the API Endpoint
Is there a way to check if the Scheduled API ran successfully WITHOUT having to check the Thing that was updated by that Scheduled WF?
In brief here is my scenario…
I’m building a POS system that lists all pending Orders in a queue (RG). It is taking approx 3secs for an Order to be picked up from the queue (updated as being served and saved into a Custom State for serving) and reflected across all screens, 3 seconds is far too long and there is a risk that 2 people may pick-up the same order.
The Scheduled API has a 3 secs delay to “verify” (ensure that it hasn’t been picked-up already) and proceed to copy order into a Custom State for fulfilling.
They really need to allows the backend workflow to return values back to the client… Still doesn’t work.
What you have to do is add it to your API Connector plugin so your app essentially calls itself, then that would return values. In your app settings you have to generate an API key for your calls to authenticate
Thanks Tyler. Seems like a basic, simple and necessary thing to add – surprising it’s not there after all this time.
Related to this, do you know if it’s possible to pass IN parameter values to a DATA call for an external API (like when trying call it from a condition, for example)?
Agreed! Perhaps it’s time to start a petition to truly bubble this up…
On the data call, Private is unchecked, but I don’t see a way through the UI to set input parameters. Maybe I’m unaware of the basic mechanism for how to do this for external data API calls?..
FWIW, @tylerboodman, what I’m talking about there is making the client-side Actions plugin API like the server-side Actions plugin API (which can return values while client-side Actions cannot, at present).
However, it’s true that the Return Data from API backend workflow action is only for one’s app’s exposed API endpoints. And you can, in fact, get the behavior of returning data from the backend in this way, if you set up an API connection to your own app’s API. (I know this seems weird and non-intuitive, but one can in fact do this. I’ve talked about this before in older videos and touch on it in this more recent video).