How to save API response in smart assist

Hi team,
Please tell me how can I save API response in message prompt.
example - In XO kore.ai platform will fetch the API response with the help of context object in the message prompt.
{{context.nodename.response.body.variable}}

How can I achieve same thing in smart assist.

@sameera.tumuluri
Hi please clarify.

Hello,

You can fetch the API response from the “Connect to API” node using below code snippet:

{{context.steps.<connect_to_api_node_name>.body}}

In the above image ‘invokeAPI’ is my ‘Connect to API’ node.

Note: If your response contains JSON, You can use JSON.stringify to see the entire response.

Ex: {{JSON.stringify(context.steps.invokeAPI.body)}}