https://discord.gg/botpress logo
Hi there. I see Autonomous node create js code to ...
# 💻developers
b
Hi there. I see Autonomous node create js code to perform its task, (well my understanding), but is there a way we can do without ? I mean, I'm trying to detect name, city or whatever in the Autonomous node and populate some user/workflow fields, but I get error like:
Copy code
Error during code execution
{ type: 'code_execution_exception',
  position: [ 2, 0 ],
  message: '\'searchResult\' is not defined',
  stackTrace: '001 | // The user is asking for a delivery price to Granby. I have found specific pricing for Granby in the search results.
> 002 | const granbyPrices = searchResult.results.find((result: any) => result.Ville === "GRANBY");
       ^^^^^^^^^^
  003 | 
  004 | if (granbyPrices) {
  005 |   yield <Message>
OR maybe I missed something I should do, like setting a searchResult variable or ???