I need Two trigger node at the same time in a work flow

Hello all,

I’m relatively new to n8n and I’m encountering a challenge. I’ve created a workflow with two separate trigger nodes - one is a Telegram trigger and the other is a webhook. My intention is for the workflow to be initiated by any one of these triggers independently, not necessarily both at the same time. However, I’m struggling to get it to function this way. If anyone has any experience or guidance on how to set this up effectively in n8n, I would greatly appreciate your assistance. Thanks in advance!

I am running n8n self-hosted on Docker. Version 1.0.5.

Hi @kpakfar :wave: Welcome to the community! :cake:

A workflow can contain multiple trigger nodes but with each execution, only one of them will execute, depending on the triggering event. Can you share your workflow with us so we can take a closer look? You can hit cmd/ctrl + A or click and drag to select all the nodes, and then cmd/ctrl + C to copy them. From there, you can paste your workflow here between two sets of three backticks (```) :+1:

1 Like

Thank you for your answer.

Does the code node run only when both triggers fire, or does it run with each one?

I have a second issue. I can’t merge outputs from these triggers due to different structures. Furthermore, I tested Merge node but due to the different structure I could not manage.

Thanks for your help.

Hi @kpakfar - The code node should fire if either trigger is hit.

Would you be able to share some sample data that we could test out merging with? Obviously nothing with sensitive data in it, but some sample data in the same JSON format as you’re working with would be helpful!

sure.

from telegram:

I have this from telegram trigger:

[
{

"update_id":
63993312849,

"message":
{

"message_id":
72,

"from":
{

"id":
387898742883886,
"is_bot":
false,
"first_name": "Khashayar",
"last_name": "Pakfar",
"username":"Kkkkk”,
"language_code":"en"
},
"chat":
{
"id":34127139817281283886,

"first_name":
"Khashayar",
"last_name":
"P",
"username":
"K”,
"type":
"private"
},

"date":
1691061361,
"text":
“Sample text”
}

}
]

Also this one Item from my HTML node:

[
  {
    "": “long text“
  }
]

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