How to read results from a backend workflow - resolved

Since this topic was automatically closed in June’21 but not resolved, I thought I would generate a new post for the sake of bubblers everywhere.

I also struggled with this problem for about an hour while building a Sign Up page (since I wanted that processing to be done on the backend), and found that this is the only way to return some result from the API. It does not involve the data action Return data from API.

Before scheduling an API Workflow, think about what you want to be returned. Perhaps it’s the text “Fail” or “Success”. Perhaps it’s object, or option. Create a new data type called Backend_API_Results . Then, create the fields you need to be returned. It’s OK to reuse the same data type for all backend APIs - just keep adding fields as needed. On your Workflow, before you call the backend API, create a new thing - Backend_API_Results . Adjust your backend API to accept a new parameter of type Backend_API_Results. Put the results in that new parameter object. Then, on the Workflow, I pause long enough for the data to be updated within the API call. I then proceed in the Workflow knowing that object now holds the desired API returned value, which for me was “Success” or “Fail”.

If you don’t like the idea of pausing for 500ms or whatever you might need, you could also ‘Trigger a custom event when data changes’. Create a custom event of the type Backend_API_Results to finish the workflow. Pass the Backend_API_Results object you created in the first Workflow into the new one using ‘Trigger a custom event when data changes’, and giving it which field to watch (the one changed by the API).

@rpetribu @ed727 @umiumansa

Happy Bubbling!


im really in dire need of help if you may be so kind to address back to Just a oauth2 question ive attempted all i know and am not doing well here at getting further

That was really clear and helpful. Thanks for sharing this approach!

Thanks! made my day