当前位置:首页 > 未分类 > 正文内容

Send Self

ceacer3周前 (05-02)未分类3954

Would you like to send a confidential note to a friend that self-destructs after it has been read so that no one else (including your friend) can ever see that secret note again? Maybe it has a password that shouldn’t be stored anywhere. Or you are worried that the private note can get leaked online.

There are web apps - like Burn Note and Privnote - that offer an easy solution. They essentially create a temporary web page that auto-expires after it has been viewed once. Dashlane is another app also lets you send encrypted notes from the desktop and the recipient gets 30 minutes of reading time after which the note will vanish forever.

Alternatively, you can even use Google Docs to send secret, self-destructing messages to anyone in few easy steps. Here’s a quick video demo:

Play ;

Self-Destructing Messages in Google Docs

It takes a minute to convert a Google Docs sheet into a self-destructing one.

Click here to make a copy of the Google sheet in your own account. Once the sheet is auto-cleared, type your secret message anywhere inside the sheet and hit the Share button to send it to a friend. Make sure the permission is set to “Can Edit” in the sharing window.

Your friend opens the sheet, reads the message and after 10 seconds, the entire sheet on his screen will clear itself. If you wish to send another self-destructing message, create a copy of the original sheet and repeat the steps.

How does it work?

The trick is simple. We have an onOpen trigger attached to the Google sheet that becomes active as soon as the sheet is opened. This trigger waits for 10 seconds (Utilities.sleep) and then runs the clear() command to empty all the cells of the sheet.

Here’s the Google Apps Script code that actually makes your “secret message” vanish.

function onOpen() {
  var time = 10; // Wait Time (in seconds)

  var ss = SpreadsheetApp.getActiveSpreadsheet();
  ss.toast("This message will disappear after " + time + " seconds");

  Utilities.sleep(time * 1000);
  ss.toast("We are now sending this private note to the shredder");

  ss.getActiveSheet().getRange(1, 1, ss.getLastRow(), ss.getLastColumn()).clear();
}

相关文章

How Teachers can Email Parents of Students from Google Forms

How Teachers can Email Parents of Students from Google Forms

A school provides email accounts for students that are enrolled in high school. The school has publ...

How to Generate Dynamic QR Codes to Collect Payments through UPI

How to Generate Dynamic QR Codes to Collect Payments through UPI

The BHIM UPI payment system has transformed the way we pay for goods and services in India. You scan...

How to Extract URLs from HYPERLINK Function in Google Sheets

The HYPERLINK formula of Google Sheets lets you insert hyperlinks into your spreadsheets. The functi...

How to Request Stripe Payments with Google Sheets

How to Request Stripe Payments with Google Sheets

Stripe now offers a Payment Links API to help you programmatically generate payment links in bulk fo...

Convert and Email Google Spreadsheets as PDF Files

You can set up a cron job in Google Drive using Google Apps Script that will send any Google Spreads...

How to Change the Date Format in Google Sheets

How to Change the Date Format in Google Sheets

Dates in Google Sheets are internally stored as numbers and the value is equal to the number of days...