Looping flow issue, either I can loop or I can exit, but not both

Hi all,

I’m new and have made a few nice flows by now, but I am stuck with something that should just be super-simple, so I’m sure I made a stupid mistake somewhere:

I have a bot that uses chatGPT API as my actual conversation partner.
When I send the user’s request to the API and then the API’s response is received and ‘talked’ back to the user (which works fine), I am listening to the user’s response to that.

One of two things should happen now:

  1. Since the bot will always end by asking if a follow-up is desired, the user should be able to just talk back, maybe ask another question or directly respond to the bot’s question. So this should loop back to sending the user’s request to the API, and so on…
  2. If the user, however, says something like “No” or “That’s all”, the flow should just exit the loop and end.

Has anybody built a looping flow like this?
Nothing I try seems to work. Either the Choice block doesn’t move back to the API block (if I define it), or if I can make it go back to the API, the exit clause doesn’t work and it keeps feeding my “No” back tot he API.

I tried choice blocks with no-match clauses to exit.
I tried choice blocks where the “No” intent is the default and only the no-match path is set to go back to the API block… but then it never enters the loop.

I also tried conditional If blocks, but they don’t seem to allow me to add intents as the thing to check, just clear text, so if I set the user’s response to a variable and use that in the If block, it does nothing. Everything just stops and no choice is made.

I’d just like to see a simple example of such a flow, so I can understand what the canonical way to do this is.
Any ideas welcome.

Cheers

Hey! So the reason the flow is ending is because of intents for “stop” and “exit”. What channel are you building for? That would help diagnose the problem! Cheers

Google Assistant is what I’m trying to use (although long-term I would like to be multi-channel, as well).

I tried like this, with just actions:

And I also tried it by drawing an arrow from the “Repeat or End” block back to the “Ask GPT” block and a number of variations.

The “Capture user reply” on the “Respond to User” block just takes the entire user response, and adds it to the same variable that then should get fed back into the “ask GPT” API call.

That is, unless this fires:
The finish_convo intend is simply listening to lots of variants of “No”, “No thanks”, “That’s all” and the like. So the user response should somehow be able to either end the convo or loop back to “ask GPT”.