Trigger node gets triggered multiple times

My project contains multiple workflows. The first workflow is triggered by a webhook.
Then this workflow triggers a 2nd workflow and then a third.
The first workflow is executed 1 time, which is ok.
The second workflow is executed 2 times, for no reason. (or not that i can find)

This is my first workflow:

{
“meta”: {
“instanceId”: “ab19a5a99ab1b40f0a809424169fd3ede815722a576b884e85083441ee2809af”
},
“nodes”: [
{
“parameters”: {
“httpMethod”: “POST”,
“path”: “bf00a696-6aa3-4cb1-a8e8-a3f3d9f71af5”,
“options”: {
“responseData”: “OK”
}
},
“id”: “14de280f-0a2d-44d4-af53-fcff7a2959cd”,
“name”: “Webhook”,
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 1,
“position”: [
440,
640
],
“webhookId”: “bf00a696-6aa3-4cb1-a8e8-a3f3d9f71af5”
},
{
“parameters”: {
“topic”: “fd1efb86-d94d-4405-bf93-6393434cebf2/ma/leads/ingest”,
“options”: {}
},
“name”: “mqtt_leads_ingest_out”,
“type”: “n8n-nodes-base.mqtt”,
“typeVersion”: 1,
“position”: [
980,
640
],
“id”: “6119f9ac-d015-4e25-a63a-c7f10b7d253a”,
“executeOnce”: true,
“credentials”: {
“mqtt”: {
“id”: “1”,
“name”: “n8n-mqtt”
}
}
},
{
“parameters”: {
“mode”: “runOnceForEachItem”,
“jsCode”: “const timestamp = new Date();\n\n$input.item.json.timestamp = timestamp.toString();\n\nreturn $input.item;”
},
“id”: “e72b53f3-521c-47b9-ac74-c02f6008162c”,
“name”: “Code”,
“type”: “n8n-nodes-base.code”,
“typeVersion”: 1,
“position”: [
700,
640
]
}
],
“connections”: {
“Webhook”: {
“main”: [
[
{
“node”: “Code”,
“type”: “main”,
“index”: 0
}
]
]
},
“Code”: {
“main”: [
[
{
“node”: “mqtt_leads_ingest_out”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}

this is my 2nd workflow:

{
“meta”: {
“instanceId”: “ab19a5a99ab1b40f0a809424169fd3ede815722a576b884e85083441ee2809af”
},
“nodes”: [
{
“parameters”: {
“dataType”: “string”,
“value1”: “={{$json["query"]["type"]}}”,
“rules”: {
“rules”: [
{
“value2”: “person”
},
{
“value2”: “property”,
“output”: 1
},
{
“value2”: “candidate”,
“output”: 2
}
]
},
“fallbackOutput”: 3
},
“id”: “48207cef-b0c3-4dc0-892c-49c965fbbdc9”,
“name”: “Switch”,
“type”: “n8n-nodes-base.switch”,
“typeVersion”: 1,
“position”: [
760,
1380
]
},
{
“parameters”: {},
“id”: “670df36f-57a8-4e8c-b900-c019776ba232”,
“name”: “Person”,
“type”: “n8n-nodes-base.noOp”,
“typeVersion”: 1,
“position”: [
1100,
1120
]
},
{
“parameters”: {},
“id”: “1574b845-8b3e-4c8d-890e-77cf4b29d94e”,
“name”: “Property”,
“type”: “n8n-nodes-base.noOp”,
“typeVersion”: 1,
“position”: [
1100,
1300
]
},
{
“parameters”: {},
“id”: “cabc66bd-6963-444c-8793-8022ac4c4d71”,
“name”: “Fallback”,
“type”: “n8n-nodes-base.noOp”,
“typeVersion”: 1,
“position”: [
1280,
1800
]
},
{
“parameters”: {
“topics”: “fd1efb86-d94d-4405-bf93-6393434cebf2/ma/leads/ingest”,
“options”: {
“jsonParseBody”: true,
“onlyMessage”: true
}
},
“id”: “6eec60e3-674a-48df-987e-9d012a3c3ac4”,
“name”: “mqtt_leads_ingest_in”,
“type”: “n8n-nodes-base.mqttTrigger”,
“typeVersion”: 1,
“position”: [
420,
1380
],
“credentials”: {
“mqtt”: {
“id”: “1”,
“name”: “n8n-mqtt”
}
}
},
{
“parameters”: {
“conditions”: {
“string”: [
{
“value1”: “={{$json["query"]["action"]}}”,
“value2”: “newemail”
}
]
}
},
“id”: “bf530ab5-5a80-44c6-a957-755846ef0dab”,
“name”: “IF2”,
“type”: “n8n-nodes-base.if”,
“typeVersion”: 1,
“position”: [
1100,
1520
]
},
{
“parameters”: {
“topic”: “fd1efb86-d94d-4405-bf93-6393434cebf2/ma/leads/process/person”,
“options”: {}
},
“name”: “mqtt_leads_process_person_out”,
“type”: “n8n-nodes-base.mqtt”,
“typeVersion”: 1,
“position”: [
1420,
1120
],
“id”: “931f6c30-4e9b-4a7b-9f9a-8bb10fe78755”,
“credentials”: {
“mqtt”: {
“id”: “1”,
“name”: “n8n-mqtt”
}
}
},
{
“parameters”: {
“topic”: “fd1efb86-d94d-4405-bf93-6393434cebf2/ma/leads/process/property”,
“options”: {}
},
“name”: “mqtt_leads_process_property_out”,
“type”: “n8n-nodes-base.mqtt”,
“typeVersion”: 1,
“position”: [
1420,
1300
],
“id”: “7b10d0e5-3253-4f78-adee-17dff7e326c2”,
“credentials”: {
“mqtt”: {
“id”: “1”,
“name”: “n8n-mqtt”
}
}
},
{
“parameters”: {
“topic”: “fd1efb86-d94d-4405-bf93-6393434cebf2/ma/leads/process/candidate”,
“options”: {}
},
“name”: “mqtt_leads_process_candidate_out”,
“type”: “n8n-nodes-base.mqtt”,
“typeVersion”: 1,
“position”: [
1420,
1500
],
“id”: “33043b47-9313-4eb4-85c4-6161d7d79c56”,
“credentials”: {
“mqtt”: {
“id”: “1”,
“name”: “n8n-mqtt”
}
}
}
],
“connections”: {
“Switch”: {
“main”: [
[
{
“node”: “Person”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “Property”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “IF2”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “Fallback”,
“type”: “main”,
“index”: 0
}
]
]
},
“Person”: {
“main”: [
[
{
“node”: “mqtt_leads_process_person_out”,
“type”: “main”,
“index”: 0
}
]
]
},
“Property”: {
“main”: [
[
{
“node”: “mqtt_leads_process_property_out”,
“type”: “main”,
“index”: 0
}
]
]
},
“mqtt_leads_ingest_in”: {
“main”: [
[
{
“node”: “Switch”,
“type”: “main”,
“index”: 0
}
]
]
},
“IF2”: {
“main”: [
[
{
“node”: “mqtt_leads_process_candidate_out”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “Fallback”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}

n8n version at the moment: 0.222.1
running via Docker

Anyone that can help figure out why the 2nd workflow is triggered 2 times even though the first workflow is only triggered 1 time?

Hi @tijsomnicasa, welcome to the community!

I am sorry you’re having trouble. I just gave this a go using a fresh hivemq.cloud account, but wasn’t able to reproduce the problem. My first workflow executed exactly once after calling the webhook using curl -X POST https://mutedjam.app.n8n.cloud/webhook-test/bf00a696-6aa3-4cb1-a8e8-a3f3d9f71af5:

The second workflow also executed only once as expected:

That said, I have tested this on [email protected] which can’t easily be downgraded to your current version 0.222.1. Perhaps you want to upgrade to the latest n8n version in a first step (make sure to take a backup though, as this migration is otherwise irreversible)?

If this still happens for you, even after the upgrade, is there a chance you might be working with a system that can’t guarantee the uniqueness of your webhooks?