Is there any way to adjust this function for use with ARRAYFORMULA in spreadsheets?
function SendTelegram(botSecret, chatId, body) {
var response = UrlFetchApp.fetch("https://api.telegram.org/bot" + botSecret + "/sendMessage?text=" + encodeURIComponent(body) + "&chat_id=" + chatId + "&parse_mode=HTML");
}
Instead of using a formula for each line like this:
=SendTelegram($H$1,$I$1,F2)
=SendTelegram($H$1,$I$1,F3)
=SendTelegram($H$1,$I$1,F4)
=SendTelegram($H$1,$I$1,F5)
By using this way:
=ARRAYFORMULA(SendTelegram($H$1,$I$1,F2:F))
Returns the following message:
Limit Exceeded: URLFetch URL Length. (line 22).