How to loop between nodes (not items)?

Is it possible to create a loop in n8n where a set of nodes continues to execute until a condition is met? For example, I want the workflow to wait for a user to enter a number. If the number is 7, the workflow proceeds and completes a task. If it’s not, the user is prompted again to enter another number, and this repeats until they enter 7.

I’m not sure how to implement this kind of conditional loop using nodes like IF, Webhook, or Wait. Any suggestions?

As an example, I have a basic workflow setup in my local consisting of an n8n form node and IF node. The true path works fine if the user enters the correct number, but I don’t know how to progress with the looping path.

n8n Version: 1.97.1 (running in localhost)
operating system: Windows 11

you can use loop node for your case instead of connecting the how to loop “wire” back to IF input node

From the IF node’s false output, wire back to the Form node (or a Wait node + webhook) to trigger another prompt. This creates the loop.

When the user finally enters 7 (true), let the workflow continue on the true path and complete the task.

Here the doc for “Loop until a condition is met” hope it helps.

@Gallo_AIA @cutecatcode The On form submission doesn’t have an input so I had to create another form after it. Here is what I have tried so far, and it seems to work but not sure if this is the best way?

  • Added another form after submittion.
  • added a loop from the false path in the IF condition
  • Mapped done from the loop to “do nothing” node
  • Set the reset option to true in the loop node

I was wrong, you can use this workflow for more simpler way.

Lemme know if it helps, and kindly mark my message as solution, thanks:)