Node Red into Telegram Bot into Telegram Chanel

Hello
i have a Node Red script sending Information to my Telegram Bot!
This Part works fine.

to be able for more reader of the Bot information i had to create a Chanel.
I did so and also added my Bot as Admin into the Chanel!

should now the information which is send into my Telegram Bot not be shown also in the Telegram Chanel?

have a nice day
vinc
PS i know has not much to do with Node-Red but till now get the most valuable Information here :wink:

Are you sending to the channel's ID? I think that the id's for users are positive and for groups are negative.

I have MQTT topics set up that let me send to people and groups by name, a flow listens for the topics and has a function node that translates the topic into the right id and formats the output.

1 Like

Hello @TotallyInformation
no Node Red is sending to a Bot.
i created a chanel and added the bot as admin with the right to send news, all other option are switched off only "Nachrichten senden" is switched on

You don't actually send to a bot. The bot sends to either a person or a group.

my node-red send the information to my Telegram Bot! i think not to a person or group :thinking:
the content is
msg id, type and the content itself and there for i had to create the Bot! just this part works! :smiley:

the Problem i have is to bring the Information which arrive into the Bot to also be published to the channel

and the node doing the telegram information is there

[{"id":"3a61bbb6.f4ba34","type":"function","z":"7b0f05c9.c8224c","name":"","func":"var message  = 'Test Message';\nvar payload  = msg.payload.text ;\nvar payloadl = msg.payload.author;\n\nmsg.payload = {chatId : 123456789 , type : 'message', \ncontent : \"*\" +message +\"*\" +\"\\n\" +\"\\n\"  +payload +\"\\n\" +\"\\n\" +\"*\" +payloadl +\"*\"\n};\n\n// activate markdown\n//msg.payload.options = {disable_web_page_preview : true, parse_mode :\"Markdown\"};\nmsg.payload.options = {disable_web_page_preview : true, parse_mode :\"Markdown\"};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":1000,"wires":[["9ad8cb5b.5c2478"]]}]

I will say it one more time. You have to set a property called the chatId as indicated in the node's documentation. Group chatId's are a negative number, individual user id's are positive.

@TotallyInformation Merci
so i will have to find out how to get the Privat Channel ID!
have a nice day
vinc

Use a debug node set to show full message, connected to the telegram nodes that receives your group chat messages - the chatId will be in there.

@Steve-Mcl Merci
how to this connection i dont have a token for the Channel.
And I asked for the Channel not the Group or Bot.
In Telegram itself the Bot is administator to the Channel but not publishing into the channel. what should work

I think that the channel ID is shown in the configuration of the channel if you are the owner.

Personal ID's can also be obtained from a bot provided by Telegram themselves - ID Bot? Can't quite remember.

Bot Token
BOt chat id all OK
Channel ID cant get it
but maybe it is just not working....

Drat, Telegram has changed their web UI and the old methods don't seem to work any more.

I think that you have to attach the bot to a group. If the bot has access to all posts, set up a flow to listen for all inputs and output to debug. The id is in the incoming msg.

If the bot is restricted, set up a / command for the bot. In NR, set up a command listener and then issue that command in the channel, again, the id is in the incoming msg.

I have about 1/2 dozen bots and a similar number of groups and they all work just fine.

There is one thing to know:
Bot features are limited when it is a member of a channel. Even if it is an administrator it is not allowed to do everything just like in a group or supergroup.
I did not know this for a while and wondered about all the problems people have with bots in channels....

Thanks for your feedback.
yes i think it is strange a Bot can't publish into a channel.
And not easy to find out the channel id to publish into. :wink:
have a nice day
vinc

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