Telegram bot errors

I followed a tutorial and wanted to utilise an existing bot and chat that I have working with an instance of node red.

I copied the same chat ID and API etc but I was getting some errors. I made a new bot and a new chat and tried again.

I originally got an error with ‘Chat not found’

Now after a bit more trying I get the error

Error sending message: Forbidden: bot can't send messages to bots. Args: (6xxx0, 'hello'), kwargs: {'parse_mode': 'Markdown', 'disable_web_page_preview': None, 'disable_notification': False, 'reply_to_message_id': None, 'reply_markup': None, 'timeout': None}

#telegram
telegram_bot:
  - platform: polling
    api_key: "6---------------------hU"
    allowed_chat_ids:
      - 6xxx0
      - -8xxx7

# telegram Notifier
notify:
  - platform: telegram
    name: "HA"
    chat_id: 6xxx0

Im trying to call this in the yaml service

service: notify.HA
data: 
  message:"hello"

I have HA running on a pi inside docker.
The reason I have two chat IDs is the original and the new one that I was trying.
Not sure what to try next.

Thanks

3 minutes after making this post I worked it out, so heres what I did wrong in case anyone else has the same issue.

First the issue was that I was trying to send to the chat bot chat ID, not a normal group chat, and that gave me an error somthing like ‘bot cannot send to bot’

Then I tried sending to an already created chatID which didnt work because the new bot was part og the group chat members.

So Ive sorted both of the above by inviting the new bot to the existing chat and created a new chat with that bot and myself in, and now both work.

1 Like