Introducing the Twitter enabled Christmas tree. The #xMKETree!
With each mention of the #xMKETree hashtag on Twitter the socially connected Christmas tree will blink its lights. So how did I accomplish this simple task? A mixture of Twitter, a Google script, the wonderful IFTTT service and a Belkin WeMo Switch.
— Dennis Jenders (@djenders) December 11, 2013
Searching for Twitter Mentions
In the past IFTTT was better connected to Twitter and you could set a specific trigger based on a search event. Unfortunately that has changed as Twitter continues to limit information from its API.
That said, there is a work around and it involves creating an RSS feed for Twitter. Unfortunately, the service also dropped support for feeds. But you can generate your own RSS feed with a simple Google script created by Amit Agarwal. (Thank you for sharing your script!)
Creating a RSS Feed for Twitter
Here is a simple, and reliable, way to create an RSS feed by following these four steps.
- Create a Twitter Widget by going to Twitter -> Settings -> Widgets. Create a new widget for your intended trigger, in this case I chose a Twitter Search Result.
- Once you have created the new widget and published it, you must take note of the Widget ID in the URL.
- The next step will be to make a copy of the Google Script provided from Amit Agarwal. After you make a copy choose Run -> Twitter_RSS to initialize and authorize the script.
- Your next, and final, step is deploy the script. First go to Publish -> Deploy as Web App and then click on Save New Version. Under Who Has Access to the App set this to Anyone, even Anonymous and finally click on Deploy.
Now that you have deployed the Google script it will generate a unique URL for the RSS application. You will take that URL and append your Twitter Widget ID (from the second step) to the URL. In my case the URL looks like this.
Belkin WeMo Switch
The WeMo will act as the controller for the Christmas tree. The goal will be to use new entries in the RSS feed to trigger an IFTTT event that will activate the WeMo Switch.
Once you have setup your Belkin WeMo Switch you can create an IFTTT Recipe.
Twitter Enabled Christmas Tree
Admittedly, this isn’t the most complicated implementation of a social media enabled Christmas tree. That said, I’ve enjoyed treating it as a small project that brings some joy right into my home and connects me with my Twitter friends. I think Kaitlyn sums it up pretty well.
— Kaitlyn (@KaitlynMKE) December 10, 2013
So, spread some holiday cheer by tweeting at the #xMKETree. And if you need to see it in action, or demand proof, here is a short clip showing the tree in action.