Closed Alefair closed 5 months ago
If you want to access the raw message then you should find it here msg.payload.originalMessage
If you want to access the raw message then you should find it here msg.payload.originalMessage
I want the photo that was put in the message.
is
msg.payload = { "chatId":xxx, "messageId":xxx, "type":"photo", "content":"AgACAgIAAxkBAAIJT2XXZUvoKcOmp6oMb09-mV6-lcvbAAJJ1zEbaAK4StFdeOx3g7IQAQADAgADeQADNAQ", "date":1708614987, "blob":true, "photos":[ { "file_id":"AgACAgIAAxkBAAIJT2XXZUvoKcOmp6oMb09-mV6-lcvbAAJJ1zEbaAK4StFdeOx3g7IQAQADAgADcwADNAQ", "file_unique_id":"AQADSdcxG2gCuEp4", "file_size":1248, "width":90, "height":51 }, { "file_id":"AgACAgIAAxkBAAIJT2XXZUvoKcOmp6oMb09-mV6-lcvbAAJJ1zEbaAK4StFdeOx3g7IQAQADAgADbQADNAQ", "file_unique_id":"AQADSdcxG2gCuEpy", "file_size":13845, "width":320,"height":180 }, { "file_id":"AgACAgIAAxkBAAIJT2XXZUvoKcOmp6oMb09-mV6-lcvbAAJJ1zEbaAK4StFdeOx3g7IQAQADAgADeAADNAQ", "file_unique_id":"AQADSdcxG2gCuEp9", "file_size":48285, "width":800, "height":450 }, { "file_id":"AgACAgIAAxkBAAIJT2XXZUvoKcOmp6oMb09-mV6-lcvbAAJJ1zEbaAK4StFdeOx3g7IQAQADAgADeQADNAQ", "file_unique_id":"AQADSdcxG2gCuEp-", "file_size":59072, "width":1024, "height":576 } ] }
i want get this file as url or to buffer
Original message as
There is a getfile example in the examples folder. Did you have a look at that one yet?
There is a getfile example in the examples folder. Did you have a look at that one yet?
Yes, I showed the example above, just an example of getfile, and I described everything that I get in response
@Alefair see https://github.com/windkh/node-red-contrib-telegrambot/blob/master/examples/downloadfile.json then check msg.payload.weblink
Hi, I want to get the full url to the picture from the message. My body is from a bot:
I thought I'd get it with the help of:
but I get a mistake: TypeError: Cannot read property 'fileId' of undefined