Skip to content

Instantly share code, notes, and snippets.

@baruchiro
baruchiro / main.gs
Last active March 22, 2023 17:43
Google Apps Script reuse
function doPost(e) {
log("Received doPost")
try {
const { chatId, text, update } = getUpdate(e)
if (myChatId !== chatId)
return sendMessage(chatId, `You are not authorized`)
if (!isDocument(update))
return sendMessage(chatId, `message is without document`)