Read a Telegram attachment
telegram_get_fileRead a file someone sent. For a spreadsheet (.xlsx), Word document (.docx), PDF or any text format this returns the actual contents — cells, paragraphs, rows — so you can answer questions about what is inside it. Spreadsheet rows come back tab-separated, one sheet per '## name' heading. For a video, audio or image there is no text to read and you get the filename, type, size and a link instead. Use the chat_id and message_id of a message whose message_type is not 'text'. Telegram refuses to serve files over 20 MB to a bot, so those cannot be fetched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | Chat the file is in. | |
| max_chars | No | How much text to return at once. Defaults to a readable slice. | |
| message_id | Yes | message_id of the message carrying the file. | |
| include_text | No | Default true. Set false to get only metadata and skip reading contents. | |
| offset_lines | No | Skip this many lines before reading. A big spreadsheet does not fit in one response, so page through it: the result says which lines you got and how many there are in total. |