Snippet Keyboard

Canned replies in one tap

View the Project on GitHub ptrinh/SnippetKeyboard-Public

Google Apps Script

A few lines of JavaScript running inside your Google account. Good when the text lives in Sheets, Calendar or Gmail and you do not want to publish it.

Steps

  1. Go to script.google.com, New project.
  2. Replace the code with:

    function doGet() {
      const sheet = SpreadsheetApp.openById("YOUR_SHEET_ID").getSheetByName("Sheet1");
      const text = sheet.getRange("A1").getDisplayValue();
      return ContentService.createTextOutput(text)
        .setMimeType(ContentService.MimeType.TEXT);
    }
    
  3. Deploy → New deployment → Web app. Execute as Me, access Anyone. Authorize when asked.
  4. Copy the web app URL (https://script.google.com/macros/s/…/exec) and paste into a Dynamic snippet.

Notes