Switch trigger executing automatically, as opposed to wait for inline button to be pressed

Describe the problem/error/question

I have a issue in my telegram n8n configuration, even if someone doesn’t select a choice from my inline buttons n8n goes ahead and sends them the message anyway, I need telegram to wait for the inline button to be pressed before sending the follow up message. I have a switch button but it’s absolutely useless, it gets bypassed and the message just sends

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@aiagentlord This workflow is sending the follow-up message without any waiting on the user to click an inline button. The Switch/IF node is not being reached. Telegram’s triggers are being hit on every type of update- on the original message AND on button click. Since both events are processed on the same execution of your workflow, your follow-up is being sent immediately.

The best solution is to separate out your button click handling from the original message flow.

1 Like

Hey the issue is your workflow doesnt have anything routing callback_queries separately from regular messages. When someone clicks an inline button Telegram sends a callback_query update, not a message, so you need an If node right after the Telegram Trigger that checks if {{ $json.callback_query }} exists and route those down a different path from normal messages. Right now everything just flows straight through regardless of update type.

1 Like

n8n only allows one telegram trigger per bot, is there any workarounds and or any other nodes

it registers but now no matter what option i press it routes the same path