Geeks With Blogs

Lance's TextBox

A few months ago, Charlie pointed out how it might be useful to have a script that would automatically post Google Calendar events on Twitter.  Then he found someone that had already done it.  Well, at the time I filed a note to do this with RSSBus - but then I got busy and never got to it - until today!  :)

Let me say that I did the RSSBus script first, and then I looked at how the other guy did it (he used a 200 line php script + Yahoo Pipes).  Here's my roughly 20 line RSB script (using the RSSBus Google Calendar connector + the Http connector for Tinyurl + the new Twitter connector):


<!-- set some Google Calendar inputs -->
<rsb:set attr="" value=""/>
<rsb:set attr="gcal.password" value="************"/>
<rsb:set attr="gcal.fromdate" value="[null | now('U')]"/>
<rsb:set attr="gcal.todate" value="[null | now('U') | dateadd('hour', '1')]"/>

<!-- set some Twitter inputs -->
<rsb:set attr="twitter.user" value="lmrobins" />
<rsb:set attr="twitter.password" value="*********"/>

<!-- call the gcalSearch operation to get events in the next 1 hour -->
<rsb:call op="gcalSearch" in="gcal" diff="gcal2twitter.xml">

  <!-- create a twitter status message out of the entry using tinyurl api -->
  <rsb:set attr="twitter.text" value="[rss:title | truncate('100')]" />
  <rsb:set attr="twitter.tinyurlapi" value="[gcal:eventweburl]" />
  <rsb:call op="httpGet?url=[twitter.tinyurlapi]">
    <rsb:set attr="twitter.tinyurl" value="[rss:description]" />
  <rsb:set attr="twitter.status" value="[twitter.text] [twitter.tinyurl]" />    

  <!-- call twitterStatusUpdate to tweet the calendar entry -->
  <rsb:call op="twitterStatusUpdate" in="twitter">
    <rsb:push />



I ran the script through and my 4:30 Google Calendar entry ("Blogging about TwitterOps") got tweeted successfully!  I'll get this script and TwitterOps uploaded to soon, until then let me know if you want me to send you the TwitterOps dll to plug-in to RSSBus.

Technorati Tags: ,
Posted on Wednesday, August 8, 2007 4:26 PM | Back to top

Comments on this post: Google Calendar to Twitter

# re: Google Calendar to Twitter
Requesting Gravatar...
This would be even better if you could change the time setting, or even better have a 2 way communication. ie, be able to ask your calendar for the events on a certain day
Left by Ben Moynihan on Feb 22, 2008 11:32 AM

# re: Google Calendar to Twitter
Requesting Gravatar...
gCalOps already has such a feature, you just need to tie it in with twitter.
Left by Lance on Feb 22, 2008 11:41 AM

Your comment:
 (will show your gravatar)

Copyright © Lance Robinson | Powered by: