I’m using a “merge” to combine it with the customer’s message and some vars in this JSON, so I have something like:"
{
"nome": "John Doe",
"message": "Quais os valores dos quartos para o dia 15?",
"14/07/2025": {"Quarto A": 150,"Quarto B": 200,"Quarto C": 300},
"15/07/2025": {"Quarto A": 150,"Quarto B": 200,"Quarto C": 300},
...
}
Then, it should access an AI Agent node, which will interpret “the 15th” as 15/07/2025, use a Code Tool (built into the AI Agent node), and return the room values.
I expect the AI Agent node to:
Interpret the customer’s message,
Use the Code Tool node to fetch the values for each date,
Return a customized message + the values per date.
I’m not using the JSON directly in the AI Agent because the input could have over 300 rows (one for each day of the year).
I assume that this date 15th to 15-7-2025 means of current month( if yes then give model current date input).
also you have description of code tool wrong change that and try it again.
Hey @Ferrgabe hope all is well, welcome to the community.
I would like to propose you use the sheet tool and let AI Agent figure out the rest, for example:
Our chat:
ME:
What is the price for the 15th?
AI:
Room prices for 15/07/2025:
Quarto A: $150
Quarto B: $200
Quarto C: $300
ME:
What are the prices for the first three days of the next week?
AI:
Room prices for the first three days of the next week (21/07/2025 to 23/07/2025):
21/07/2025 - Quarto A: $210, Quarto B: $260, Quarto C: $360
22/07/2025 - Quarto A: $220, Quarto B: $270, Quarto C: $370
23/07/2025 - Quarto A: $230, Quarto B: $280, Quarto C: $380
ME:
What about next weekend?
AI:
Room prices for next weekend (26/07/2025 - 27/07/2025):
26/07/2025 - Quarto A: $260, Quarto B: $310, Quarto C: $410
27/07/2025 - Quarto A: $270, Quarto B: $320, Quarto C: $420