-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe a bug in the loop #13600
Comments
Hey @schieck0, We have created an internal ticket to look into this which we will be tracking as "GHC-1004" |
Hey @schieck0 The issue with the loop node will likely be that you are not resetting it so it never loops over the second input batch and just dumps it to the done branch. Try using the reset with an expression and you should be good to go. |
@Joffcom thank you, bu i dont understand how to do the expression. |
Maybe helpful |
Describe the problem/error/question
I have a list of discord channels that I filter by specific names where I send messages periodically. As the filter node only allows 10 conditions I had to create 2 filters, so I loop the results to send the messages in the channels. However, only the 10 channels of the first filter receive it, the other 6 do not. Am I doing something wrong or is it a problem in the loop?
Please share your workflow/screenshots/recording
{
"nodes": [
{
"parameters": {
"authentication": "oAuth2",
"operation": "getAll",
"guildId": {
"__rl": true,
"value": "704329648842211401",
"mode": "list",
"cachedResultName": "GH Branding",
"cachedResultUrl": "https://discord.com/channels/704329648842211401"
},
"returnAll": true,
"options": {}
},
"type": "n8n-nodes-base.discord",
"typeVersion": 2,
"position": [
-300,
-320
],
"id": "c1881786-21f6-4c13-bfc6-d9b3f4672917",
"name": "Discord Get All Channels",
"webhookId": "f216307c-b76c-4b72-8a5b-58a9a8a810cc",
"credentials": {
"discordOAuth2Api": {
"id": "Dx52GFPIhuKCrVwZ",
"name": "Discord GH"
}
}
},
{
"parameters": {
"batchSize": "=1",
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
180,
-320
],
"id": "9054acd0-27a5-43c6-9f94-ea0b246da785",
"name": "Loop Over Items",
"executeOnce": false
},
{
"parameters": {
"amount": 2
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
460,
-300
],
"id": "0ceab3c8-7dfe-45af-aadf-118332a7bbd2",
"name": "Wait",
"webhookId": "18575836-f4ba-42cd-a0d4-12e5dc50f5a2"
},
{
"parameters": {
"authentication": "oAuth2",
"resource": "message",
"guildId": {
"__rl": true,
"value": "704329648842211401",
"mode": "list",
"cachedResultName": "GH Branding",
"cachedResultUrl": "https://discord.com/channels/704329648842211401"
},
"channelId": {
"__rl": true,
"value": "={{ $json.id }}",
"mode": "id"
},
"content": "Boa tarde @here!\n\nLembre de mandar o report semanal com as ações da semana e as previstas, até amanhã às 12h.\n\nEnviem o report no forms> https://forms.gle/rQxXhHgKa8eW34ZT8 ",
"options": {}
},
"type": "n8n-nodes-base.discord",
"typeVersion": 2,
"position": [
660,
-300
],
"id": "a7520b32-b936-469b-bc55-72d0ab4898f3",
"name": "Send Message",
"webhookId": "d73470d9-4b4b-4738-8b3f-ab325eb4279c",
"retryOnFail": true,
"maxTries": 2,
"waitBetweenTries": 5000,
"credentials": {
"discordOAuth2Api": {
"id": "Dx52GFPIhuKCrVwZ",
"name": "Discord GH"
}
},
"onError": "continueRegularOutput"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "3d171fc1-7393-481e-8d3d-27d9eef2d879",
"leftValue": "={{ $json.name }}",
"rightValue": "one-7",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "a0784d63-61f7-4685-8e88-662323fd668f",
"leftValue": "={{ $json.name }}",
"rightValue": "pitstop",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "17fe6b53-20ea-4ec4-8aa8-f3585099f98e",
"leftValue": "={{ $json.name }}",
"rightValue": "são-josé",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "5c0ba659-0a3c-4116-b3d5-70ae46af4c6a",
"leftValue": "={{ $json.name }}",
"rightValue": "thais-rodrigues",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "715d33fd-1ccd-46fc-9849-4a5f47255a3a",
"leftValue": "={{ $json.name }}",
"rightValue": "move-by-movement",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "036d956c-3941-4042-8798-40793eb178d3",
"leftValue": "={{ $json.name }}",
"rightValue": "v10-growth",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "f179c69a-5b57-49cd-81d4-13dd71b4c6a2",
"leftValue": "={{ $json.name }}",
"rightValue": "cast-group-automacao",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "0bd333d3-eb7f-4e8c-b93d-95691ecac39f",
"leftValue": "={{ $json.name }}",
"rightValue": "degalls",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "4d43d2a0-3549-49a2-bf0b-a5181d78de26",
"leftValue": "={{ $json.name }}",
"rightValue": "farmtech-performance",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "4747cee4-5b57-4af4-a72d-cacbee611661",
"leftValue": "={{ $json.name }}",
"rightValue": "vultus-growth",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
-60,
-320
],
"id": "5300f3dc-4799-43c1-a431-5449bb13cd4c",
"name": "Filter"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "a0784d63-61f7-4685-8e88-662323fd668f",
"leftValue": "={{ $json.name }}",
"rightValue": "santa-lolla",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "17fe6b53-20ea-4ec4-8aa8-f3585099f98e",
"leftValue": "={{ $json.name }}",
"rightValue": "leve-saúde-growth",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "5c0ba659-0a3c-4116-b3d5-70ae46af4c6a",
"leftValue": "={{ $json.name }}",
"rightValue": "tenda-performance",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "715d33fd-1ccd-46fc-9849-4a5f47255a3a",
"leftValue": "={{ $json.name }}",
"rightValue": "cast-group-solucoes",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "60f37630-3e3c-4c26-9438-de47d742f040",
"leftValue": "={{ $json.name }}",
"rightValue": "aya-growth-marketing",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "3955b843-5d05-4bb2-a82d-484a83cf7702",
"leftValue": "={{ $json.name }}",
"rightValue": "parktur",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.2,
"position": [
-60,
-120
],
"id": "d007dfed-7777-4491-9704-c40f1815cc00",
"name": "Filter1"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
4
],
"triggerAtHour": 13,
"triggerAtMinute": 30
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
-520,
-320
],
"id": "25a2db7a-130e-41e4-9082-a6879a93c29c",
"name": "Growth Report"
}
],
"connections": {
"Discord Get All Channels": {
"main": [
[
{
"node": "Filter1",
"type": "main",
"index": 0
},
{
"node": "Filter",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Send Message",
"type": "main",
"index": 0
}
]
]
},
"Send Message": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Filter": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Filter1": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Growth Report": {
"main": [
[
{
"node": "Discord Get All Channels",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"instanceId": "f73fbe8b57e757d66664c0a698e5857781e59f72670592aed23c4ab9139499a9"
}
}
Share the output returned by the last node
Debug info
core
storage
pruning
client
Generated at: 2025-02-28T22:07:48.631Z}
The text was updated successfully, but these errors were encountered: