When using a loop block, the value variable is not accessible in the Body of the Rest API

See screenshot.
When making an API request while looping through a simple array, the value variable cannot be used in the Body parameter.

Is this a specification? Or am I using it incorrectly?

P.S. I can access the value variable normally within URL parameters.

Error content
Unexpected token 'F', "Failed to "... is not valid JSON

1 Like

Having the same issue, Headers and URL parameters allow for outside information, but body wont recognize. Please share some solution.

Hi, had the same issue. Solved it by changing step 1 to

return [
{"postvariable": "a"},
{"postvariable": "b"},
{"postvariable": "c"}

and {{value}} in step 2 to {{value.postvariable}}

so it looks more like the example in the docs:
Iterate through data with the Loop block | Retool Docs

Let me know if this works for you

Hi folks, I'm curious if I can get the retool version that you're working under when you're seeing this. We believe this is a known bug that we're tracking, but it's very intermittent, and ask @andreask points out small changes can knock it back into working, so it's been difficult to get a handle on.

To get your Retool version, you can click on your user icon, and the version should be at the bottom.
Screenshot 2023-12-14 at 11.27.22 AM

Thanks for reporting this!

also 3.26.0 here