Workflow runs when I trigger each query individually, but not when I run the whole thing

Hey guys, I am having a strange issue with this workflow where it runs successfully in the editor view when I click the play button on each block one at a time. I can go all the way through to the end and it saves the results to the database.

BUT when I try to run the entire workflow with the big run button in the corner, or by triggering it from the frontend, it never completes. From the logs it seems to be hanging up on the retoolai step. But this step works fine when I run it on its own. What am I missing here? What is different when I run the whole flow, how can I get it to work?

Any help greatly appreciated :slight_smile:

Screenshot 2024-02-14 170835

What shows up in the Run History when you trigger from the app? If you click on the various tabs, you can see what went in and what came out of any passed or failed step:
image

Agreed! It would be helpful to see the run history logs. Is there an error message? :slightly_smiling_face:

There is a weird bug we have to fix where if any AI query blocks have a timeout over two minutes, the workflow fails when you run the whole workflow (despite individual blocks all working). Any chance that's what is causing your workflow to fail?

Once we resolve this, we'd love to hear more about your use case for the AI Query block. If you follow the format outlined here, you'll earn a badge for your community.retool.com profile & could win prizes.

Thanks both of you! Some screenshots here, the previous steps all have the expected data coming out, but the ai step doesn't log anything. Tess, I think you might be onto something with the timeout issue. I am using almost the exact same workflow in other places with no issues, but this one is asking for a more complex response from openai and could be timing out. When I run the ai query on its own it completes in 1 minute and 20 seconds though.

Screenshot 2024-02-14 184059
Screenshot 2024-02-14 184044
Screenshot 2024-02-14 184005

:thinking: What timeout setting do you have on the AIQuery block?
image

I have it set to the max timeout :slight_smile:

Thanks! If you set that to 120000, does the whole workflow run successfully? Will try to bump this bug internally!

IT WORKED!! Wow, thank you so much! That was all I had to do. Also the ai block is triggering immediately now whereas previously there was kind of a lag before it even initiated. Yes would be great to fix this when you can as I am building some even more complex ai requests down the line that could definitely go over 2 mins. Really appreciate your help Tess!

Glad that helps for now! Yes, will keep you posted about the fix! :pray:

1 Like