Switch on flow using telegram bot

Hello,
I am making a home security alarm for a school project and i want to turn turn it on and off wih Telegram bot.
Does anyone have an idea of how I can do this? Scince I cannot connect my Telegram sender to my PIR SENSOR input..
Kind regards, Zeno

See the cookbook for one example of how to do it.
The PIR always triggers but the switch stops the messages if the system is "OFF"

https://cookbook.nodered.org/basic/route-on-context

I sent you a possible solution (screenshot and sample NR flow) using Telegram (to another thread you posted) the other day.
Have you not read it yet???

You seem to have posted very similar requests several times now in the last few days. Under 2 different logins.