SMS Reports

Setting up SMS notification for BI reports

SMS notification isn’t always supported out of the box by BI reporting tools. Luckily, there is a quick hack that we can use with Google Docs to automatically send email notifications from a particular email ID notifying the end user when a new report is ready. This little hack can also be used in other similar situations.

You will need to configure the Label, Filter, Google Docs and Google Calendar to set up SMS notification.

Lets Start.

Creating a Label

  1. Login in to your to Gmail account.
  2. Click on the gears icon on the top right and select Settings.settings Setting up SMS notification for BI reports
  3. Go to Labels tab, scroll down a bit and then click Create new label.create-label Setting up SMS notification for BI reports
  4. Make the label name notifyMe and click Create. Now label creation is done.new-label Setting up SMS notification for BI reports

Creating a Filter

  1. Click on the Filter tab and then on the Create a new filter link.filter Setting up SMS notification for BI reports
  2. If you want SMS alerts only for selected emails such as your manager or boss or the automailer that sends your BI reports. Set the filter condition using Fromfield.(Replace email id in below picture with the desired email id)

    create-filter Setting up SMS notification for BI reports

  3.  For SMS alerts for all incoming emails. Set the Has the words field with is:inbox
    filter-all Setting up SMS notification for BI reports
  4. Click on Create filter with this search.
  5. Click on Apply the label dropdown and choose label notifyMe.apply-label Setting up SMS notification for BI reports
  6. Now click on Create Label and you are done with creating a filter.

Creating a Script in Google Drive

  1. Login to Google Drive (formerly Google Docs).
  2. Click on Create and then on Spreadsheet.
    new-spreadsheet Setting up SMS notification for BI reports
  3. Now from the menu bar select Tools-> Script Editor. A popup comes up, just close it.
    new-script Setting up SMS notification for BI reports
  4. Now erase default code and replace it with the code given below:
    /*Original Script by Romain Vialard
    Modified by Mr. Neeraj Jindal*/
    	function notifyMe() {
    		try {
    			var label = GmailApp.getUserLabelByName('notifyMe');
    			var threads = label.getThreads();
    			var now = new Date().getTime();
    			for(i in threads) {
    				CalendarApp.createEvent(threads[0].getFirstMessageSubject()+": "+threads[0].getMessages()[0].getFrom(),new Date(now+30000),
    new Date(now+30000)).addSmsReminder(0);
    			}
    			label.removeFromThreads(threads);
    		}
    		catch(err){}
    }
  5. 5. Now click on Resources-> Current script’s triggers. It will ask for Project name. Type “Notify” and click “OK”
    script-triggers Setting up SMS notification for BI reports
  6. 6. After this click on “No trigger set up. Click here to add one now” link as shown below.
    new-trigger Setting up SMS notification for BI reports
  7. 7. Now select all 4 things in dropdowns as shown below in image.
    setup-trigger Setting up SMS notification for BI reports
  8. 8. Click Authorize and then Grant Access. Now click close and save the trigger again and with this Google doc’s script configuration is complete.

Google Calendar Configuration

  1. Go to Google Calendar.
  2. Click on the gears icon on the top right and select Settings.
  3. Select the Mobile Setup tab
  4. Select Country, enter your phone number and now click Send Verification Code and wait for a text message to be sent to your phone.
  5. Once you receive this message, enter the code in the Verification code field and click Finishsetup.calendar-mobile-setup Setting up SMS notification for BI reports
  6. Now got to the Calendar tab and click on the Reminders and notifications link.
  7. Now under Notifications select SMS as your default notification channel and save it.
    calendar-reminders Setting up SMS notification for BI reports
  8. Google Calendar configuration is now done.

Now whenever you receive an email from that particular email id you’ll get SMS notification. You can also modify this script to configure your machine such that whenever somebody open it up you will get SMS notification that somebody has opened your laptop or desktop. For help on this or further queries/help please comment below.

Thanks.

The post Setting up SMS notification for BI reports appeared first on OptimusBI.