A couple of days ago, I had a problem uploading a photo file to the AI node. I solved it. But while I was setting up the general workflow, I encountered a new problem with the chat session ID, as well as a duplicate AI agent output due to incorrectly configured merge and set nodes. The duplicate AI agent output was because the session ID was being treated as text, not as a separate memory location for the bot.
There’s also a problem with the switch node. Why is line {{ $json.body.Text }} has not an output? The webhook body looks like this:
“body”:
{
“chat_id”:
“5693”,
“messageType”:
“text”,
“Text”:
“hello!”
},
Thank you very much for your attention and solution to this problem!
Hey @Boba228ai hope all is good.
Please pin the data in the webhook node attach your workflow so that we could take a look.
thank you! so Webhook receives a photo file or text with id_chat. The switch detects text or a photo. If it’s a photo file, it uploads it to the AI node. If it’s text, it passes it on to the AI agent. Node a Set chat_id is text. I understand it’s in the wrong location, but I couldn’t decide what I need to with that. I have Postgres memory and Supabase enabled, but I temporarily disabled them.
The issue in the switch node happens due to the following:
You are comparing the string “Text” to the string “hello!” - they are not equal, thus the first rule fails.
If you want to check whether there is a text there, use the same expression {{ $('Webhook').item.json.body.Text }}, but change the operation to “exists”.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.




