Describe the problem/error/question
Hi guys.
I want to check an API every minute and if a certain query changes I want to go out of the loop. I like the loop to run for a certain amount of time.
I can’t find out how I can manage that. Can anyone help me?
{
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "b179c77d4379bfcd59361de6cfbc65a16ad4d2c07f085fc31ce786510423c5c8"
},
"nodes": [
{
"parameters": {
"batchSize": "=1",
"options": {
"reset": true
}
},
"id": "06763bde-5f22-4234-8ffa-bfd038a55676",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
280,
460
]
},
{
"parameters": {
"amount": 2,
"unit": "seconds"
},
"id": "d5954b70-a21e-479e-951f-945b72eb22f0",
"name": "S1 10min1",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
560,
480
],
"webhookId": "7fbc94c1-c371-46f8-93a9-c688ec37cbaf"
},
{
"parameters": {
"url": "https://examplel.com/wp-json/custom/v1/user-meta/",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "user_id",
"value": "=161"
},
{
"name": "meta_key",
"value": "=poolplus4"
}
]
},
"options": {}
},
"id": "3f2a5278-7da0-406d-96c6-217aa4a3bdbc",
"name": "S1 - Status ",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
800,
480
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "fa425c8a-381b-49a1-ae40-0061fea72ad6",
"leftValue": "={{ $json['session status'] }}",
"rightValue": "=true",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "aef913c5-96cd-4b8f-b6da-09537db89ef3",
"name": "S1 - Check ",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
980,
480
]
},
{
"parameters": {},
"id": "c2b3b258-5230-4c0b-bb2d-6404112d8e13",
"name": "When clicking \"Test workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
20,
460
]
}
],
"connections": {
"Loop Over Items": {
"main": [
null,
[
{
"node": "S1 10min1",
"type": "main",
"index": 0
}
]
]
},
"S1 10min1": {
"main": [
[
{
"node": "S1 - Status ",
"type": "main",
"index": 0
}
]
]
},
"S1 - Status ": {
"main": [
[
{
"node": "S1 - Check ",
"type": "main",
"index": 0
}
]
]
},
"S1 - Check ": {
"main": [
null,
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"When clicking \"Test workflow\"": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {}
}```
Information on your n8n setup
- **n8n version:latest
- **Databas: SQLite
- **Running n8n via Docker
- **Operating system:Ubuntu