How to vibecode note-taking app (and make Durov mad)
AppScript code for saving note in Google Doc

How to vibecode note-taking app (and make Durov mad)

Disclaimer: This is not a real app — just a combo of Google Sheets + Google Docs. And no, it probably won’t make Durov mad. But you might stop using one Telegram feature. Title is metaphorical.

Since I started using Telegram, I’ve been dumping random thoughts into Saved Messages. But recently, I decided to keep all my notes in one clean 📄 file. Here’s what I used:

  1. Google Forms to submit a note.
  2. Form saves a response (a note text, date, and category) in Google Sheets
  3. App Script to save each note in a Google Doc


Step 1: Google Forms

The form has two fields:

📝 Note (text)

📂 Category (multiple choice)

Article content
Google Forms: a form with a text field and multiple options

Click Publish, and you’re ready to go!

If you go to Responses => View in sheets, you’ll see saved responses in Google Sheets: 

Article content
Google Sheets: saved response from Google Forms

Step 2: App Script code

Once a form is submitted, the data is saved in a new row in Sheets. But how to save a note in Google Docs too?

For this, let’s create a new file in Google Docs. Copy the ID of the document. If you look at the URL of the doc, ID starts after the “document/d/” and ends before the “/edit” characters.  

Now, we need App Script. Go to Google Sheets => Extensions => App Script. Here, paste the following code generated by AI:

function onFormSubmit(e) {
  const submittedData = e.values;

  const timestamp = submittedData[0];      // Column A: Datetime
  const noteText = submittedData[1];       // Column B: Note Text
  const noteCategory = submittedData[2];   // Column C: Note Category

  const docId = "YOUR_DOCUMENT_ID";   // Replace with your actual Doc ID
  const doc = DocumentApp.openById(docId);
  const body = doc.getBody();

  body.appendParagraph(`📅 ${timestamp}`);
  body.appendParagraph(`📂 Category: ${noteCategory}`);
  body.appendParagraph(`📝 Note: ${noteText}`);
  body.appendParagraph("--------------------------------------------------");

  doc.saveAndClose();
}        

In the code, replace YOUR_DOCUMENT_ID with the ID that you copied from the Google Doc URL. 

Now click the ⏱️ Triggers icon in the sidebar → Add Trigger:

  • Choose function: onFormSubmit
  • Event source: From spreadsheet
  • Event type: On form submit

Article content
App Script: triggers icon


Click Save, and authorize the script if prompted.

Done!

Let’s try to submit a form with a note: 

Article content
Google Forms to submit a note

As you can see, every time you submit a form, the note will be saved in both Google Sheets and Google Docs.

Article content
Google Sheets saved a response from a form


Article content
Google Docs saved a response from a form

This was a brief guide on how to complicate your note-taking process. But hey, now you have a searchable, structured doc with all your thoughts in one place. I hope you also enjoyed vibecoding some useful app 🖥 with 🤖 AI.

Wishing you a happy (and uncomplicated) week!

To view or add a comment, sign in

More articles by Abduvosid Malikov

Insights from the community

Others also viewed

Explore topics