Today I stumbled through configuring my Telegram Trigger in n8n. I saw a lot of questions on this forum, so I thought I’d post what worked for me. In addition to the standard instructions I also needed to to this:
- Set the webhook:
- Use Postman to POST to
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook
Under Body, choose form-data and create a key:value pair of:
url:<YOUR N8N WEBHOOK>
- Check the webhook with POST
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook
(and no body)
- Use Postman to POST to
[After doing that, I accidentally discovered that posting ‘test’ to the group would not trigger anything, but posting ‘/test’ (or anything that starts with ‘/’) would trigger n8n. So I did the next two items.]
-
Privacy Mode:
- Disable privacy mode:
- Open a chat with BotFather.
- Send the command
/mybots
to see a list of your bots. - Select your bot and use the command
Edit Bot Privacy
to turn off privacy mode.
- Disable privacy mode:
-
Group Admin:
- Ensure that your bot is an admin in the group chat. For the bot to receive all messages in a group, it typically needs to have admin permissions.
Now Telegram triggers instantly. Hope this helps someone.