Not getting the correct response in passing variables in REST API loop in workflow

I have a very weird issue I am facing. I have this resource of Rest API. I want to use it in a loop block in a workflow to get the necessary data.

When I set up the workflow loop block and pass the URL params as a variable, the response I get is just message.

In the same loop block, if instead of variables I pass actual values, then it works perfectly.

I tried to just use the resource directly out of the loop block and in there, the variables also work fine.

Can anyone please help me understand what I am doing wrong and how to fix this?

A few of us are having the same issue with loops and using value/index.

@Tess from Retool is having the team look into it.

Thanks @Jessica_D

@Tess is there any ETA on this?

Bumped this internally—will keep this thread updated once we hear back!

A quick note (while we're still waiting for a better resolution):

A user running into a similar issue confirmed that changing the loop lambda type to something else and then switching it back to Retool Workflow resolved it. Does this work for anyone here?

@victoria you mean switching to code and then switching back to GUI in the loop codeblock?

@victoria - encountering the same issue where the current loop item is undefined when I reference it in a Twilio request body param. Can you elaborate on what the workaround here is until there is a fix?

Hey @amany112! Trying to reproduce this issue this week and can't seem to do so. Are you still running into this issue?

Screen Shot 2023-12-19 at 8.20.07 PM.png

Still facing the same issue.

@victoria can you help me understand how to make this work?

I have a bunch of questions for you if you don't mind!

  1. Has this ever worked, or has it always just returned message?
  2. Can you share a screenshot of the rest of your workflow? Specifically, the block that's triggering this loop!
  3. Also, just to test, if you delete and recreate your loop block, does it make a difference?

@Tess @victoria - did this ever get a resolution? I am running into a similar result where I am just getting an empty message back and not the standard data and metadata that I get when running the same REST API outside of the loop.

Hi @jg80 In most cases, changing the loop lambda type to something else and then switching it back to Retool Workflow resolved it. We haven't had recent/reproducible reports in awhile. Could you share some screenshots?

@Tess - I am also curious if there is a resolution. However, my issue is slightly different. Passing value to the URL works fine, but passing a value to the BODY fails.
image

in the chrome or edge dev tools if you go to the network section are you able to see the request being sent? if so, is the body/data being sent correct and does the response tab have anything? lastly, does the input tab on the workflow loop block have any previous blocks that are grey and they shouldn't be?
image

once or twice i've managed to confuse the crap out of either retool or the linter and the input tab will have startTrigger.data or getAssistant.data or something grayed out when it shouldn't be (the block is clearly connected and i tried removing the connections and re-making them but the block still wouldn't realize it had access to something)

Hi @Tess - unfortunately (for the diagnosing of the issue, that is), I moved away from the approach so I don't have anything easily available. I want to go back and recreate, but don't really have the bandwidth right now...if I do, I'll either come here or create a new one if this is closed.

Thanks!

1 Like

What does value.payload evaluate to? Is it an object?