Repeating an action a number of times

I have a simple workflow - it recieves a webhook and creates a new entry in a Cockpit collection.

How would I get it to repeat so that it adds a number of entires based on a field receved by the webhook. For example:

A field called ‘Count’ with a value of 5 would create 5 entries - if the ‘Count’ value was 17, it would creat 17 entries


Hi @seank1968 :wave:

Have you checked out our docs on how to create loops, here? Looping | n8n Docs

The If node should help you out here :slight_smile:

1 Like

I missed that!

An IF node with {{$runIndex}} is smaller than the incoming ‘Count’ value - much simpler than I thought!

Many thanks


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