Agile Tortoise's Drafts is a nifty tool for writing texts and doing things with them on an iOS device. I use it mostly for the more comfortable writing environment, and send texts as emails or tweets, but there's an entire sub-culture that's been hacking Drafts to do many things. (Check out the Drafts actions directory.)
David Sparks posted an interesting use of Drafts (credited to Milosz Bolechowski; I couldn't find the original on his site), together with noodlesoft's Hazel - a tool that automates tasks on your Mac - to put a Mac to sleep. In essence, Hazel looks for a file named "MB sleep" in a the Drafts folder in his Dropbox folder; when it finds that file, it puts the Mac to sleep with an AppleScript.
I think you might be able to do this with folder actions as well, but I'm not very good with AppleScript. So if you can, feel free to post a script in the comments.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20130523015954957