# 🛠technical-support
Sanyam
Sanyam·9 replies

hi team, im using ai and code block to generate a api payload from natural user language, now that respose is getting stored in a variable FLOW.last_response, but now i cannot pass this variable to raw json part of thew api block? how can we work around this please i need it resolved asap because of deadline im on

Sahil | YourGPT
Sahil | YourGPT15/10/2025 12:01

Have you tried this with code execution node?

Sanyam
Sanyam15/10/2025 12:03

are you saying to call the api in the code block itself? coz i have done payload transformation in code as of now

Sahil | YourGPT
Sahil | YourGPT15/10/2025 12:06

Yes, you can call the API inside the same code block — I think that’s the more suitable place for it.

Sanyam
Sanyam15/10/2025 12:27

are there any restrictions in calling the rest api in the code block? also will i be able to use the json response to call the caraousel for products?

Sahil | YourGPT
Sahil | YourGPT15/10/2025 12:35

The code execution is quite flexible for these use cases — you can give it a try.

Sanyam
Sanyam15/10/2025 13:40

@Sahil can u please check,i added api calling here but im not getting the response from it here please let me know the issue

Sanyam
Sanyam16/10/2025 04:55

? @Sahil

Sanyam
Sanyam16/10/2025 05:27

@Sahil i have ran the api and stored the response as well just guide me how i can use the result of this to show carousels, right now im giving paths like these

Sahil | YourGPT
Sahil | YourGPT16/10/2025 05:36

https://help.yourgpt.ai/article/how-to-create-configure-carousels-component-in-studio-831

Please refer to this guide for creating dynamic carousels — it includes detailed information on all the steps.