Send /note to save something word for word in Baserow, and /find to read your notes back in the same chat.
Uses
Baserow
Telegram
Keep notes in Telegram, stored in Baserow
Whenever a message arrives in your Telegram chat, it is checked to see whether it starts with /note or /find. Send /note followed by anything you want to remember and it is kept in a Baserow table exactly as you typed it. Send /find on its own to read back your most recent notes, or /find with a word to see every note containing it, all in the same chat.
Nothing is rewritten, summarized or tagged on the way in or out, and no AI reads your notes at any point: what you send is exactly what is stored and exactly what comes back. A note that could not be saved, or a lookup that failed, is reported in the chat rather than silently lost. Long notes are shortened when listed but kept in full in the table, and a reply lists only the latest few and says how many were left out. Any other command gets a short reminder of the two that work.
Before the first run you need a Telegram bot, a private chat with it, and a Baserow table with three text columns named 'Note', 'From' and 'Saved'.
message.When a new message is received. Save it as message.notesTableId to blank.Set notesTableId to blank.maxNotesShown to 10.Set maxNotesShown to 10.notesShown to maxNotesShown multiplied by 1.Set notesShown to maxNotesShown multiplied by 1.notesShown is less than 1If notesShown is less than 1chatId to message.chat_id.Set chatId to message.chat_id.messageText to blank.Set messageText to blank.noTextErrorIf a step below fails, save the error as noTextErrormessage.text and save it as messageText.Trim message.text and save it as messageText.messageText is emptyIf messageText is emptymessageText by a space and save it as words.Split messageText by a space and save it as words.words[0] split by “@” lowercase and save it as command.Make the first item of words[0] split by “@” lowercase and save it as command.words joined by a space and save it as rest.Trim the items from index 1 onward of words joined by a space and save it as rest.command is not “/note” and command is not “/find”If command is not “/note” and command is not “/find”messageText starts with “/” (ignoring case)If messageText starts with “/” (ignoring case)chatId.Send a message to chat chatId.I keep notes for you.
/note <what you want to remember> - saves it word for word
/find <word> - shows the notes containing that word
/find - shows your most recent notescommand is “/note”If command is “/note”rest is emptyIf rest is emptychatId.Send a message to chat chatId.Write the note after /note, for example: /note the spare key is in the blue tinauthor to “unknown”.Set author to “unknown”.noNameErrorIf a step below fails, save the error as noNameErrormessage.from_username and save it as author.Trim message.from_username and save it as author.saveFailed to false.Set saveFailed to false.saveErrorIf a step below fails, save the error as saveErrornotesTableId.Create a row in table notesTableId.saveFailed to true.Change saveFailed to true.saveFailed is yesIf saveFailed is yeschatId.Send a message to chat chatId.I could not save that note to Baserow, so it has not been kept. Nothing was changed - send it again in a moment.chatId.Send a message to chat chatId.Saved: rest truncated to 200 characters using "…" as the ellipsisnotesPage to nothing.Set notesPage to nothing.readFailed to false.Set readFailed to false.readErrorIf a step below fails, save the error as readErrornotesTableId. Save it as notesPage.List rows in table notesTableId. Save it as notesPage.
Rows per page: 200readFailed to true.Change readFailed to true.readFailed is yesIf readFailed is yeschatId.Send a message to chat chatId.I could not read your notes from Baserow just now. Nothing was changed - try again in a moment.savedRows to notesPage.results.Set savedRows to notesPage.results.matches to an empty list.Set matches to an empty list.savedRow in savedRows:For each savedRow in savedRows:rowError If a step below fails, save the error as rowErrorsavedRow.Note and save it as noteText.Trim savedRow.Note and save it as noteText.noteText isn't empty and rest is empty or noteText contains rest (ignoring…If noteText isn't empty and rest is empty or noteText contains rest (ignoring…noteText truncated to 300 characters using “…” as the ellipsis to the end of matches and save it as matches.Add • noteText truncated to 300 characters using “…” as the ellipsis to the end of matches and save it as matches.matches is emptyIf matches is emptyemptyReply to “You have no notes saved yet. Send /note followed by anything you want to remember.”.Set emptyReply to “You have no notes saved yet. Send /note followed by anything you want to remember.”.rest isn't emptyIf rest isn't emptyemptyReply to “No saved note contains “@rest”.”.Change emptyReply to “No saved note contains “@rest”.”.chatId.Send a message to chat chatId.emptyReplymatches from position -notesShown on and save it as shown.Take matches from position -notesShown on and save it as shown.header to “Your most recent notes:”.Set header to “Your most recent notes:”.rest isn't emptyIf rest isn't emptyheader to “Notes containing “@rest”:”.Change header to “Notes containing “@rest”:”.matches is greater than the length of shownIf the length of matches is greater than the length of shownheader to “@header (the latest the length of shown as text of the length of matches as text)”.Change header to “@header (the latest the length of shown as text of the length of matches as text)”.chatId.Send a message to chat chatId.header
shown joined by a new line