How to send a PDF file to a Telegram group from Google Apps Script

Using the WhatsMate Telegram Gateway REST API



This article shows you how to send a PDF file to a Telegram group in Google Apps Script.

To send a PDF document to a Telegram group from a Google Apps Script, do this:

  1. First, learn how to send a simple text message on the official site.
  2. With the above knowledge, you can now download our sample code.
  3. Locate the file gas/group-send-telegram-pdf.gs.
  4. Study the Google Apps Script source code and customize the TODO/FIXME lines.
  5. Run the function demoSendTelegramImageToGroupFromDrive to send your PDF file to a Telegram group.

Happy coding :)