Add a check condition for a loop in n8n — n8n Workflow
Overview
This workflow demonstrates the use of $runIndex expression. It demonstrates how the expression can be used to avoid an infinite loop.
The workflow will create 5 Tweets with the content 'Hello from n8n!'.
You can use this workflow by replacing the Twitter node with any other node(s) and updating the condition in the IF node.
Nodes used
X (Formerly Twitter)
Workflow Preview
⚡
O
On clicking 'execute'
I
IF
N
NoOp
Twitter
4 nodes4 edges
How it Works
- 1
Trigger
The workflow starts with a trigger trigger.
- 2
Process
Data flows through 4 nodes, connecting if, manualtrigger, twitter.
- 3
Output
The workflow completes its automation and delivers the result to the configured destination.
Node Details (4)
X twitter
#1
X (Formerly Twitter)
How to Import This Workflow
- 1Click Download JSON button on the right to save the workflow file.
- 2Open your n8n instance. Go to Workflows → New → Import from file.
- 3Select the downloaded
add-a-check-condition-for-a-loop-in-n8nfile and click Import. - 4Set up credentials for each service node (API keys, OAuth, etc.).
- 5Click Test Workflow to verify everything works, then activate it.
Or paste directly in n8n → Import from JSON:
{ "name": "Add a check condition for a loop in n8n", "nodes": [...], ...}
Integrations
ifmanualtriggertwitter
Created by
Harshil Agrawal
@harshil1712
Tags
ifmanualtriggertwitter
⚡
New to n8n?
n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.
Get n8n Free →