General Musing

blaze your trail

HootSuite Auto Scheduling using Google Docs #twitter

with one comment

I like using the HootSuite bulk uploader, and round the time I posted the post HootSuite Bulk Uploads I had set up a Google Docs file to produce the csv file it requires as input. It can simply be made by uploading the example provided by HootSuite to Google Docs and using that as a template.

Google Documents Validation

As I was explaining the features of HootSuite to my mother, including the bulk uploader, I suddenly realized that I could make my spreadsheet more valuable for myself and others by adding a check to see whether it has 140 characters. I wasn’t able to use the regular Docs Data Validation, so I decided to roll my own in the script editor, which meant adding a Trigger to the script so it is called after the spreadsheet is edited.

Google Docs Trigger

function checklength() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var dataSheet = ss.getSheets()[0];
  var tweets = dataSheet.getDataRange();

  var data = tweets.getValues()
  for(var i = 0 ; i 140) {
      var rowRange = tweets.offset(i, 0, 1);
      rowRange.setBackgroundColor("#FFDD88");
    } else {
      rowRange.setBackgroundColor("#FFFFFF");
    }
  }
}

The script verifies that the message in column B is no longer than 140 characters and changes the background colour for any messages exceeding 140 characters. You can see it in action here.

After creating the file you can use Download as… to download it in CSV format. The go to the compose message and press the calendar icon, which opens the calendar (left). Press the Schedule in Bulk button to open the uploader (right). Here you can select a social profile and upload CSV file ou just created with up to 50 messages. HootSuite will schedule these messages for this profile. Any errors are concise, they usually relate to problems in the file due to invalid input or duplicate messages.

Writing this blog post probably took longer than writing the script.😉

Written by Daniël W. Crompton (webhat)

February 26, 2012 at 9:53 pm

One Response

Subscribe to comments with RSS.

  1. […] Filed under: business, social Tagged: bulk, facebook, google, googledocs, hootsuite, ping.fm, twitter from http://specialbrands.net/2012/02/26/hootsuite-auto-scheduling-using-google-do… […]


Please Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: