« Review: War of the Worlds - The New Generation | Home | A Refresher in Prog »

December 5, 2012

Posting to MovableType from ifttt

I use ifttt.com quite a lot to aggregate all the various things I like on the web onto the /elsewhere/ blog but ifttt doesn't natively support MovableType even though it does support Wordpress.  I have contacted them in the past as adding MT compatibility should be trivial, but have so far had no response.  To manage the aggregation, I have been using the PostOffice plugin, but it's messy and has very little control over what gets posted, as either ifttt or gmail are stripping most of the HTML from the email.

So today I made a bridge that will allow anything that insists on WP implementation of xmlrpc to talk to MovableType.  It's a fairly simple solution, merely inserting the blogid and passing everything else on as is.  It works for posting to MovableType, I have yet to test reading posts, but it should be easy enough to tweak if needed.  Code after the jump....

Bear in mind that this will need to be in the root of your domain and called "xmlrpc.php" as ifttt will only look there, if you can, use a subdomain or a rewrite if putting it at the domain root is not desirable.  It doesn't need to be on the same site as your MT install, however.

UPDATE 11/08/2014: I have added support for multiple blogs by appending the ID to the title of the entry. E.g. "My awesome entry {4}" will override the default blog ID specified and post to blog ID 4. (Hat tip to Jonathan in the comments for the suggestion).