The final boss of errors

Been struggling massively with this workflow for the past few hours. The problem I’m having is that my “Arguments” node before “BookSlot” doesn’t output the correct info; it just outputs “null”. I’ve tried mapping all the different variables, but nothing seems to work. Not sure what I’m missing, but logically, it looks like it should work. I’m mapping the correct info in the respective field, but nothing’s happening. Any help is appreciated. Thanks!





With everything we can see on the screenshots provided, yes, this should work. Would you like to share a minimal reproducible example of the issue (a simplified workflow) with the issue happening?

This is what I’m getting when I run the workflow. Let me know if you need more context.

Ok yes, looking at your video, there is potentially issues with how your data flows. The main issue is that you need to see what the output is of the Respond to webhook in the top right, since that is the direct input to your Arguments node using $json.

The next issue is that you have two inputs into Arguments which could be confusing:

  1. From the tool-call-name - Which is what I think your arguments node is reading, hence your expected fields are null
  2. The Respond to webhook, which is prob being ignore.

As a test, delete the line from tool-call-name to Arguments and test again. I suspect the values will map now

There’s no variables to map from inside the Webhook node, not sure why the info isn’t passed through there.


This is the JSON of my webhook node, maybe something else needs to be mapped inside

{
“results”: [
{
“toolCallId”: “{{ $(‘Event = tool-call’).item.json.body.message.toolWithToolCallList[0].toolCall.id }}”,
“result”: “We’ve got available slots at {{ $json.availSlots }}, do any of those work?”
}
]
}

1 Like

Yes so this is exactly your problem. You’re trying to reference variable values from the previous node which does NOT exist. You can however access previous nodes by using their name as reference like this: {{ $(‘Node Name’).first().json.variable }}

Respond to Webhook will essentially send a REST response to the client which called this workflows Webhook node.

So if I assume the node “tool-call-name” has the name of the customer then you should change the mapping in the Arguments node to something like this:

requestTime = {{ $('tool-call-name').first().json.body.message.toolCalls[0].function.arguments.requestTime }}

name = {{ $('tool-call-name').first().json.body.message.call.customer.name }}

reason = {{ $('tool-call-name').first().json.body.message.assistant.analysisPlan.structuredDataPlan.messages[1].content }}

As a best practoce rule I NEVER use $json in my mappings because this will look at the node immediately before the current executing node. I religiosly use the named references, because if I decide to add a node inbetween two nodes which use $json, it will break the mappings

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.