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 < data.length; i++) {
    var rowRange = tweets.offset(i, 0, 1);
    if(data[i][1].length > 140) {
      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. ;)

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…

Written by Daniël W. Crompton (webhat)

February 26, 2012 at 9:57 pm

Posted in Uncategorized

Tagged with

One Response

Subscribe to comments with RSS.

  1. If you are having trouble with leading 0s (zeros) in your dates you might like to have a look at the following exchange I had on Twitter: https://twitter.com/JodiWomack/status/429696297122009090

    For the TL;DR: try to set the date column to 26/06/2008 15:59:00 (rest of the world) or 9/26/2008 15:59:00 (US), it’s the same option by with a US locale only slightly misleading as it lack the leading zero.


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: