Running workflow in app returns no response on success despite ending with response block

I built and tested a new workflow, very similar to an existing workflow which is working correctly.

When I run this new workflow as a query in my app, I do not get data in the response. The workflow succeeds, verified by viewing the files that get added to Retool Storage and DB within the workflow. The success event handlers for the workflow query also trigger correctly. But there is no response data from the workflow in the query. I get the "No results returned. Query ran and did not return any results." message in the "output" section of my query and MyQuery.data is an empty object after query success.

Here's what I have tried so far:

  • Confirmed the workflow ends with a "response" block
  • Confirmed the workflow is triggered by a webhook
  • Confirmed the latest changes for the workflow are deployed
  • Confirmed the workflow is succeeding in the run history
  • Confirmed that successful runs end with the "response" block and that block data is correct
  • Deleted and recreated the "response" block and tried adjusting the data that is returned
  • Created a new query to trigger the workflow from within the app
  • Created a new blank app with a new query to trigger the workflow in a new app environment

Nothing I have tried yet will show data returned from the workflow inside my app's query.

I also haven't been able to recreate the issue - I created a new blank test workflow that just returns a response block but this succeeds as expected.

I'm using Retool Cloud 3.48.0

Any suggestions for where I should look to try and get this working? I may be able to work around the issue but I'd rather resolve it.

Update: I came back to try debugging again today and experienced a new issue that could be related.

When running the app queries that I created yesterday to trigger workflows (the problem workflow and a fresh test workflow), I'm getting an error message and the query fails without triggering the workflow: Unable to retrieve information about the query "MyQuery"

I'm getting the same error when triggering the query manually ("run" button on the query) and triggering with in-app event handlers. The error appears on all queries I made yesterday which reference multiple workflows. Queries made before yesterday are still working. New workflow queries I've made today are also failing with the same error message. This is not impacting non-workflow queries - I've successfully made new test resource queries for Retool Storage and Retool DB just now which succeed.

I noticed there has been a change to the interface for adding a workflow query, it now says "Import Workflow (New)" in the menu to add a new query. However, this error message prevents me from adding new workflow queries using both the Import Workflow (New) option and the "Resource Query" option (and then searching for workflow. I'm not sure if this change is related to the errors I'm seeing with this and my original comment about response data.

This new issue is only happening in my main app. In my fresh test app created yesterday, new workflow queries are succeeding without the error. And the original issue from my first post (workflow response not appearing in the query data) is currently working correctly in my new test app where it was failing yesterday, with no changes since I last tested.

I'm stumped at the moment and can't implement new workflow queries in my core app.

Another update: I seem to have fixed the issue by creating a new release. I got the idea because of some similar posts like this one which suggested to merge branches. I'm not I'm not using git version control for this app but I thought I'd try the release.

I'm still not sure what caused this issue because I was triggering the erroring workflows within the retool edit page with the latest unreleased version (not previewing the app or using the app live with a prior release). But I'm now able to trigger the workflow queries which were failing before release and the original issue of the workflow query not returning data is magically resolved as well.

Hi @benp, thank you for the detailed report of this issue. To get a bit more context:

Were releases enabled on the App before this, or did you create the first release to try to fix this issue?

Hi @Paulo! Thanks for replying.

Releases were enabled on the App before this issue popped up. I've been using them for ~1 month or so and releasing every few days. I haven't seen any issues with releases that I know of or any other issues resolved from creating a new release.

Thank you. I'm glad to hear the issue went away with a new release!

1 Like