Taking a picture and sending it via telegram

and the telegram node also fires saying

msg.payload.chatId is empty

i set the file mode to buffer and the same information was displayed

show me your flow and the debug output of the camera

  • add a debug on the output of the telegram command node
  • add a debug on the output camera node
  • add a debug (set to show complete message) just before the telegram reply node - lets see whats in there

inspect them - is everything in the right place?
Is the msg.payload.content a buffer?
is the msg.payload.chatId set correctly?

i am using the sample flow u sent above. i have done as u said. replacing the http node with a camera node and setting it as buffer

It works for me.

If you dont add the debugs - you'll never understand why it doesnt work.

It's likely your msg going into the telegram reply is mising 1 or more parts or the data is incorrect type.

Without debug nodes - its impossible to tell.

here is what i have with the debug nodes and wat they say
i can get images from my camera using motioneye but i dont know why it is not work here

The screenshot you have posted shows me that the camera node is not giving an image - but without doing what I asked, i have no idea.

Do that ^ and show me the debug output

I have sent a JPG to the family Telegram group, where my bot is also member. All users have received the JPG.

@DamianosS
Hi. May I ask flow example? Thank you in advance.

Just put this in a function node and send it to the Telegram sender.

var payload = { 
chatId: -12345678,
    type: "photo",
    content: "/home/pi/.node-red/static/back.png" };
return {payload};

chatID is the ID of the group! Change the path to the picture (in my case a static PNG).