Possible to add a loop for each node using a new w...
# 🤝help
t
Hey! The purpose of my bot is to retrieve information from the user, but I want the user to be able to ask a question each time. I've set up a loop that allows : - answer the question the user has asked -if there's no answer, ask chat gpt -In both cases, the bot returns to the question posed to the user. The thing is, I only made the loop for the 1st node. Is it possible to integrate it into each workflow node without copying and pasting my loop each time? I know it's possible to send the user to another specialized workflow, but how can I find out which node he was at and send him back there? Is this even possible? Thanks 🙂
m
I’m looking to figure out the same thing
f
You could at the start of each node change a variables name to the name of the node. Then you would use expression cards in the loop node to check for each node name and then transition to the desired node. This would be just as much work as creating new loop nodes
t
Thanks for the reply "You could at the start of each node change a variables name to the name of the node." -how to do that ? I need to do an AI task ? "Then you would use expression cards in the loop node to check for each node name and then transition to the desired node." -And for this an AI transition ? Yup it's work, but if I need to change something in the loop, it's easier to do it in just one, than all the loop I created
f
"how to do that ? I need to do an AI task ? " - You could do it with an execute code card. "And for this an AI transition ?" You would use the expression card with something like: workflow.variable name == "Node name" and then transition to that node
t
Ok thanks, I've insert a execute card at the start of each node and I insert the name of each Node. Now how in my loop workflow I transition to each specific node ? I don't know how with the expression card
Maybe you have an exemple ?
f
You could just do user.Node = 'apporteur' I don't have an example laying around and I am going to on my phone for the most of today so I can't create one.