Writes every message your Telegram bot receives to a Google Sheet as a row - the time, who sent it and exactly what they typed.

UsesGoogle SheetsTelegram

Log Telegram messages to a spreadsheet

Whenever your Telegram bot receives a message, one new row is added to your Google Sheet holding exactly what was typed. Nothing is summarised, categorised or rewritten on the way, so the sheet stays a plain record you can read, filter and total yourself.

Each row records when the message arrived, the sender's Telegram username, their numeric user ID and the text itself, in that order. Rows are only ever added, so nothing already on the tab is touched. A message with no text, such as a photo or a sticker, is skipped rather than written as a blank row, and a sender with no username is recorded as 'unknown' with their numeric ID still beside it, so no message is lost. This is the answering half of a check-in loop: if you also want a question sent to you on a schedule, that is a second workflow posting to the same chat.

Before the first run you need a Telegram bot in the chat you want recorded and a sheet with a tab carrying those four column headings.

TelegramTelegramWhen a new message is received. Save it as incomingMessage.When a new message is received. Save it as incomingMessage.
ValuesSet spreadsheetUrl to blank.Set spreadsheetUrl to blank.
ValuesSet sheetName to blank.Set sheetName to blank.
ValuesSet messageText to blank.Set messageText to blank.
Decisions & LoopsIf a step below fails, save the error as noTextErrorIf a step below fails, save the error as noTextError
Try
TextTrim incomingMessage.text and save it as messageText.Trim incomingMessage.text and save it as messageText.
On error
No steps
Decisions & LoopsIf messageText is emptyIf messageText is empty
Yes
Decisions & LoopsFinish the run: That message carried no text, so there was nothing to record.Finish the run: That message carried no text, so there was nothing to record.
No
No steps
ValuesSet senderName to blank.Set senderName to blank.
Decisions & LoopsIf a step below fails, save the error as noSenderErrorIf a step below fails, save the error as noSenderError
Try
TextTrim incomingMessage.from_username and save it as senderName.Trim incomingMessage.from_username and save it as senderName.
On error
No steps
Decisions & LoopsIf senderName is emptyIf senderName is empty
Yes
ValuesChange senderName to unknown.Change senderName to unknown.
No
No steps
ValuesSet senderId to incomingMessage.from_user_id.Set senderId to incomingMessage.from_user_id.
Decisions & LoopsIf senderId is nullIf senderId is null
Yes
ValuesChange senderId to blank.Change senderId to blank.
No
No steps
Dates & TimesGet the current date and time and save it as recordedAt.Get the current date and time and save it as recordedAt.
Google SheetsGoogle SheetsAdd a row to sheetName in spreadsheetUrl.Add a row to sheetName in spreadsheetUrl.