본문 바로가기

node-red

send telegram message in node-red

Node-Red 상에서 텔레그램으로 채널 메세지 보내기 

순서

1. 봇생성

BotFather 채팅방에서 /newbot

봇이름은 _bot으로 끝나야함

 

2. 내 계정으로 채널 생성

 

3. 채널에 봇추가

 

4. 채널을 비공개 설정 후 다음 블로그 참조

gist.github.com/mraaroncruz/e76d19f7d61d59419002db54030ebe35

 

Get the Telegram channel ID

Get the Telegram channel ID. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

 

5. 노드레드에서 텔레그램 send에 정보 등록

 

6.function 스크립트 등록

msg.payload ={};
msg.payload.chatId = channelid;
msg.payload.type = "photo";
msg.payload.content = "/root/node-red/download/image/test1.png";
msg.payload.caption = "test124576";
return msg;

 

 

'node-red' 카테고리의 다른 글

윈도우에서 node-red 설치 및 서비스로 실행  (0) 2020.12.26
NodeRed Dashboard 삭제 방법  (0) 2020.06.10