Send Csv file to telegram bot

Hi

I'm saving the sensor data to csv file and I want to send the saved csv file to telegram bot

I'm getting unsupported buffer file type when i send it as document type

So what is you problem and what have you tried?

Tried to upload as .xls and .csv but getting error

Put a debug node (set to display the Complete msg object) on the output of your function node to see what you are sending

So that is not a document it is a buffer which is why you get the error. Try exporting your spreadsheet as a csv file and sending that

I'm able to select from this list,

Sorry, I'm new to this

How to do it, any reference can I get

have you tried the other options?

yeah tried all four, didn't succeed

Is the incoming file is CSV format?? The CSV node

csv

Converts between a CSV formatted string and its JavaScript object representation, in either direction.

So if you are reading in a excel file it won't work. The file coming in has to be is CSV format (which is why I told you:

Try exporting your spreadsheet as a csv file and sending that

Once you've fixed the buffer issue, what makes you think that Telegram understands CSV format? What are you wanting to achieve?

If you want to upload it as a file that can be downloaded by a Telegram user, you need to format the payload correctly: Uploading and Downloading Files (telegram.org)