DIY : Create Self-Destruct Messages with Google Docs in Mission Impossible Style

It’s a clever technology, as well as a manifestation of an interesting argument that some legal and internet scholars have begun to make: All information should have an expiration date.  This means, once they read the message they will no longer be able to read it again after the timer has reached zero. This ensures your message is read by no one but the reader and all evidence of the message is erased.

You can send passwords and other private information as self-destructing messages in Google Docs that will vanish after being read.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?

There are web apps – like and Burn Note – that offer an easy solution. They essentially create a temporary web page/link that auto-expires after it has been viewed once.

Alternatively, you can even use Google Docs to send self-destructing messages to anyone through Google Apps Script.

Creating Messages in Google Docs

This message will self-destruct in ten seconds. It takes a minute to convert a Google Docs sheet into a self-destructing one. Just follow this :

  • Open your Google Docs account and create new spreadsheet.


  •  Input your data that you will be sharing with your friend. Then go to Tools > Script Manager, a new tab will be popped.


  • Select Blank Project in the title menu. An editor will be available in your browser, copy-paste Script to this editor from below this page and save it.


  • Don’t forget to change value of time variable according to your need (seconds to wait before cleanup). Hit Save icon.
  • Now close Script editor window, Open again script manager by going to Tools or hit Reload if it is already opened. You will find your script listed there.
  • Lastly, Click on Share button available in top-right corner of the screen. Change Access from CAN VIEW to CAN EDIT. Then Share it.

self-destruct-google-docs-sharingMake 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. So read fast !!!”);

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

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