Saturday, November 14, 2015

The Most Popular and Useful Google Scripts

Google Scripts offer programmatic access to most Google products including Gmail, Google Docs, Google Drive, Analytics, Google Contacts, Calendar, Maps and Google Analytics. The Google scripts are written in regular JavaScript language and they are hosted on Google’s servers.

Most Useful Google Apps Scripts
Here’s an always-updated collection of Google Scripts that will help you do more with your favorite Google products. And you don’t have to be programmer to use any of these scripts.
  1. Files Permissions Explorer – See who has access to your shared files and folders in Google Drive and whether they view or edit permissions.
  2. Google Form File Uploads – You can receive files directly in your Google Drive from anyone through HTML forms created with HTMLService.
  3. Mail Merge with Gmail – Send personalized email messages to your contacts using the Gmail Merge add-on.
  4. Send to Google Drive – You can save your Email and Gmail attachments directly to Google Drive with the Save Emails add-on.
  5. Retweet & Favorite Bot – Another Twitter bot written in Google Scripts that will auto-retweet matching tweets.
  6. Gmail Autoresponder – Reply to one or more email messages in your Gmail using pre-written email templates.
  7. Website Uptime Monitor – Receive instant email and SMS alerts when your websites goes down. You can monitor all your web domains for free.
  8. Amazon Price Tracker – Keep track of prices of your favorite products on Amazon and get email alerts when the prices go down or up.
  9. Gmail Unsubscriber – Automatically unsubscribe your email address from mailing lists and bulk emails.
  10. Read Receipts in Gmail – Use Apps Script and Google Analytics to track your outgoing Gmail messages and get notified when people open and read your email.
  11. Advanced Gmail Filters – Have more control over the criteria for sorting incoming messages in your Gmail.
  12. Send Google Spreadsheets as PDF – You can setup a recurring task that will convert your spreadsheet to PDF and email to specific recipients as per schedule.
  13. Download Tweets Permanently – specify any hashtag and the script will download and save all matching tweets to a spreadsheet.
  14. Schedule Gmail Emails – You can write the emails now and send them later at any date and time with Apps Script and Google Sheets.
  15. Sell Digital Products Online – Use a combination of PayPal and Google Drive to setup your own digital shop online.
  16. Save Google Voicemails as MP3 – The web app will automatically copy the MP3 of your Google voice mail messages from Gmail to Google Drive.
  17. Gravity Forms to Google Sheets – Write a Google Script that will save your Gravity WordPress form entries to a Google Spreadsheet without Zapier.
  18. Gmail Encrypt – You can encrypt your outgoing Gmail messages using the powerful AES encryption and no one will be able to snoop your private conversations.
  19. 1-click Website Hosting – Use this Google Script to host your websites, images, podcasts and other media files on Google Drive with one click.
  20. Google Web Scraping – Import Google Search results into a Google Spreadsheet with the ImportXML function for analysis or export them in other formats.
  21. Flipkart & Snapdeal Price Tracker – Monitor and compare prices of items listed on Flipkart and Snapdeal and get price alerts via email.
  22. Bullk Tweets & DMs – You can send personlized tweets and Direct Messages in bulk to Twitter users from a Google Spreadsheet.
  23. Save Gmail Images – The script monitors your Gmail mailbox and will auto-save any image attachments to your Google Drive.
  24. Sort Gmail by Size – Is your Gmail mailbox running out of space. The scripts will determine all the bulky messages in your Gmail mailbox.
  25. Bulk Forward Gmail – The auto-forward feature in Gmail only works on incoming messages but our bulk forward script can forward even older email to your other email addresses.
  26. Update Google Contacts –  See how your friends and family members can directly add or update their own contact information into your Google address book.
  27. Google Contacts Map – The Google Script will plot the postal address of your Google Contacts on a Google Map. You can also export this data as a KML file for Google Earth.
  28. Email Form Data –  Google Forms are the best tool for creating online polls and surveys. The script will email you the entire form data as soon as someone submits the form.
  29. Auto Confirmation Emails – Send confirmation emails to the user’s email address after they submit a Google Form.
  30. Schedule Google Forms – Set an expiration date for your Google Form and they’ll close automatically at a certain date.
  31. Twitter Bot – Learn how to write your own Twitter bot that auto-responds to tweets. This particular bot queries Wolfram Alpha to answer queries.
  32. WordPress Authentication with Google Scripts – Put anything behind a WordPress login be it a link to download a document from Google Drive or a web app created in Google Apps Script.
  33. Twitter Out-of-Office –  You can create out-of-office automatic replies for people who are trying to reach you via Twitter and they wouldn’t expect a response from you right away.
  34. SMS Alerts for Gmail – You can receive SMS text alerts for important incoming messages in your Gmail by connecting your mailbox with a private Twitter account.
  35. Extract Email Addresses – The script scans your mailbox and creates a list of email addresses of people who have previously communicated with you.  Useful for building your email marketing lists.
  36. Transfer Gmail – Moving to a different email address? The script will automatically copy all your email messages from your old Gmail inbox to another mailbox that could be on any web service.
  37. Reminder for starred messages – Get a daily digest with a list of messages that you have “Starred” in your Gmail mailbox and may want to follow up on them.
  38. Advanced Gmail Search – Gmail supports a variety of search commands but now you can also use Regular Expressions for searching messages on Gmail.
  39. Twitter RSS Feeds – Twitter no longer provides RSS feeds but you can use Google Apps Script to create your own feeds for Twitter timelines, searches and lists.
  40. Google+ RSS Feeds – This Apps Script based Chrome add-on will help you generate RSS feeds for any Google Plus user or even search results. Written by Eric Koleda.
  41. Translate RSS – You can translate foreign language RSS feeds into your native language with Google Scripts and subscribe to them in your favorite news reader.
  42. Gmail Label Feeder –  Create a RSS feed for any of your Gmail labels that you can later feed into Evernote, Pocket, etc. through IFTTT. Written by Martin Hawksey.
  43. Gmail Meter – The script will help you analyze how you use Gmail and generates statistics like how much email you send, average length of messages, turn-around time, etc. Written by Romain Vialard.
  44. Gmail Delay Send – While there are browser add-ons that let you schedule emailsin Gmail, the script is easier, safer and your messages will be delivered on a specified date and time. Written by Blair Kutzman.
  45. Gmail Snooze – When you snooze an email, it disappears from view but reappears in the inbox at some specified time in the future. Written by Corey Goldfeder.
  46. Gmail Auto Purge –  Similar to auto-sweep in Outlook, the script will automatically delete older email messages from specific senders after a certain period of time.
  47. Gmail Clean-up – Create time-based filters in Gmail that will automatically move, archive or even delete all messages from any particular Gmail label that are older than “n” days. Written by John E. Day.
  48. Save Gmail as PDF – The script will save the body of an email message as a PDF file. You can optionally send the converted PDF to your email address.
  49. Instagram Downloads – Download photos belonging to specific tags from Instagram to your Google Drive with Apps Script. Written by Waqar Ahmad.
  50. GDocs2MD – The script will convert your Google Drive documents into the popular Markdown (.md) format that can be imported into several publishing platforms. Written by Renato Mangini.
  51. Gmail NoResponse – It tracks your email messages in Gmail that are awaiting response and where you may want to send a follow-up mail. Written by Jonathan Kim
  52. Force Password Change – If you are an admin of a Google Apps domain, use this script to force all your domain users to change their passwords. Written by Waqar Ahmad.
  53. Text Browser – A Lynx-inspired browser that lets you browse the web in text and is written using Apps Script. The browser can also be used as a proxy server for reading web content.
  54. Self-destructive Messages – Send confidential messages inside a Google Sheet and the message will disappear after it has been read.
  55. Auto-Expire Shared Folders – You can set an expiry date for your shared folders in Google Drive and the shared links will automatically expire at the specified date and time.
  56. Reddit Scraper – Use the Reddit API with Google Scripts to download all posts from any Reddit to your Google sheet.

How to Sort Gmail Messages by Size

What do you do when your Gmail account storage is nearly full? You can either purchase additional storage space from Google – they charge $5 per year for 20 GB – or a cheaper alternative would be that you scan your Gmail mailbox for messages that contain large file attachments and delete (or forward) all the bigger messages and recover precious space.
The problem is how do you find these bulky messages in your mailbox when Gmail doesn’t offer an option to sort and filter messages by size?
gmail sort by size

Sort GMail Messages by Attachment Size

What we use is a simple Google Sheet that connects to Gmail, computes the size of individual messages and lists the bulky ones (size > 1MB) in the same Sheet. Here’s how you can get started:
  1. Create a copy of the Gmail Sort Google Sheet in your Google Drive.
  2. Click Scan Mailbox under the Gmail menu and authorize to let the script access your Gmail Inbox. It is an open-source Gmail Script that runs in your own Drive.
Sit back and relax as the script will pull the message list in the sheet. If the process stops for some reason, click Scan Mailbox again and the script will resume scanning from where it left off.
Once the sheet has a list of all the bulky message, you can sort the sheet by theSize column to find the big ones. Or use the Filter option (the Funnel icon) to find messages that are within a particular range (5 MB < size < 10 MB). Click the “View” link to open the corresponding message in Gmail, bulk auto-forward the big email to another email address or use the Save Emails add-on to download the big emails and attachments to your Google Drive.
Troubleshooting tips: If you get an error that says “Service invoked too many times for one day” or “Exceeded maximum execution time”, you may want to wait for some time before re-running the program. These are Google Apps Script limits to prevent abuse.

Sort Gmail Messages by Size with a trigger

If your Gmail mailbox is large, you can also set up a time-driven trigger to let the script run automatically without manual intervention. In this case, you can even close the browser tab and the script will run in the background. Here’s how:
  1. While the Google sheet is open, go to Tools -> Script Editor. On the next screen, choose Resources -> Current Script Triggers.
  2. Click “Add a New Trigger,” change the Event from “Spreadsheet” to “Time Driven” and set a minutes timer that triggers every 10 minutes.
  3. Save the trigger, authorize the script if it requires and close the sheet.