Telegram message to two different workflow

Hey,

I have one telegram bot, and two different workflows , my question is can i use the same telegram bot to use both the workflow , is there anyway I can use a trigger word so that my workflow knows when to execute based on telegarm message?

Did you try it?

Yes. User message is available to the workflow and you can test if it contains a trigger word using If or Code node among other possible approaches.

ok so that means in both workflows I will have to use the same telgram trigger, but after telegram I use if condition, and if the condition is true then only it will execute the workflow else not, am I right? I will have to put if or switch conditions in both the workflows after telegram message received am I right?

I encourage you to try. You will know the answer very soon and learn something useful about both Telegram and n8n triggers.

You cannot use the Telegram trigger for the same bot in 2 workflows.

The way it works is: when you activate a workflow with that trigger (or click on Test), it registers the webhook to the Telegram Bot API. Then Telegram calls that webhook when somebody writes to that bot in Telegram.

There can be only one webhook for the bot. That’s how Telegram Bot API is designed.

So, activating the second workflow with same bot will overwrite the webhook URL that the first workflow had set. Nothing will come to the first workflow since then.

The way to go here is having one trigger and route it based on whatever condition you have using “if” node or maybe “switch”. Then you can have 2 flows after that node.
Next level depending of their complexity would be to have 2 new workflows which are called from this main one.

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