Drafts - ThoughtAsylum Action Group Suite

I figure as the author the ThoughtAsylum stuff that Alex Cox mentioned on episode 62 I should probably provide some additional information in case people are interested in making use of what is proving to be an increasingly popular and powerful set of resources for Drafts.

What is ThoughtAsylum?

“ThoughtAsylum” is, well, just me. thoughtasylum.com is my personal web site and is why my non-work handle online is @sylumer in so many places. I tend to tag a lot of things with ThoughtAsylum as a kind of brand identity. Hopefully, it is unusual enough that if someone comes across something ThoughtAsylum’ish at random, they can find their way back to the source if they have questions, are looking for an update, etc.

What is the ThoughtAsylum Action Group Thing?

The Drafts App by Greg Pierce allows you to run automations known as actions within the app. These can do a wide variety of things. Mainly with the content you have in the drafts (notes) in Drafts, but not exclusively. Sets of these actions can be grouped into sets known as action groups.

I created an action group for Drafts which quickly got so big I had to split it into multiple action groups - this is the ThoughtAsylum Action Group Suite that Alex is referring to in episode 62, but it was actually released back in July 2020, not in September as Alex suggested; I think that comes from when Merlin Mann started discussing it on a few podcasts, including a brief mention on Do by Friday which is also hosted by Alex.

The suite is intended to be just a big library of actions that you can dip into, and I’m updating it at least once a month with more actions.

  • There are currently seven action groups in the suite - one core action group that is a prerequisite, and six others that cover various areas of working.
  • There are currently well over 400 actions spread across these action groups.

The idea was users could install them, and just call the actions from their own actions in their own action groups. This allows you to assign your own names, keyboard shortcuts, and create your own personalised action groups and update the ThoughtAsylum action groups freely without losing your settings. Hence why I think of them as a library of actions for people to utilise.

Where do I Find The Action Groups

The action groups are all available in the Drafts Action Directory, and I’ve provided direct links below. If you have Drafts installed, when you select the install link from the Action Directory page for the group, it should download and install the latest version. For updates, you simply get rid of the old action group, reinstall, and it will give you the latest version.

  • Install ThoughtAsylum (CORE)
    • This is used by the other action groups and is a prerequisite. You must have this one and run the set-up action to use the other groups.
  • Install ThoughtAsylum - Writing Action Group
    • The writing action group contains actions that are designed to help you with writing content in Drafts. They allow you to insert, modify and remove content in a wide variety of ways. This action group should be useful to everyone who uses Drafts.
  • Install ThoughtAsylum - Management Action Group
    • The management action group contains actions for working with drafts at the level above the content. Working with meta data, navigating drafts, working with workspaces. This action group should be useful to everyone who uses Drafts.
  • Install ThoughtAsylum - Export/Import/Share Action Group
    • The export/import/share action group is the next level along from draft management. It deals with getting draft related data into and out of Drafts. This can be via the clipboard, share sheet, files, etc. This action group should be useful to everyone who uses Drafts.
  • Install ThoughtAsylum - Trove Action Group
    • The trove action group is a place to find a variety of other useful actions. These include actions for managing and working with the Drafts user interface for example. This action group is likely to be useful to everyone who uses Drafts.
  • Install ThoughtAsylum - Tasks & Lists Action Group
    • The tasks and lists action group contains actions for working with lists including tasks in check lists. It can be thought of as a list specific extension to the writing action group. This action group should be useful to drafts users who use lists.
  • Install ThoughtAsylum - Power User Action Group
    • The power user action group contains actions that are of use to Drafts users who are interested in writing their own scripting actions, and those who are interested in working with more advanced add-on features like custom meta data, or examining statistical information about the content and actions they have in drafts.

Here are some other links that you will also find useful if you install them.

  • Action Listing - I maintain a single page searchable listing of all actions in the suite. This includes details about each action including the description for the action.
  • Change Log - I also maintain a log of all updates in the action group suite.
  • TADpoLe Posts - This is a list of posts that are related to the suite of actions. Typically these provide examples of how to use some of the more sophisticated actions, though I do have a list of ones I still need to write.

Err… TADpoLe…?!

“TADpoLe” is the ‘ThoughtAsylum Drafts Library’ and is a set of JavaScript code that underpins the majority of the action group suite; drafts actions supporting JavaScript steps across macOS and I*OS platforms.

The set-up of the core action group downloads this code locally. Actions can then include the library by including the TAD action in their own actions. This is why the core action group is a pre-requisite.

Actions outside of the ThoughtAsylum action group suite are now beginning to appear on the action directory that utilise the code library.

As you might expect, TADpoLe is also regularly updated. In fact, it is updated slightly more often than the action group suite, and it currently contains well over 500 functions designed to help develop Drafts actions and generally get even more value from Drafts.

The library is fully documented at tadpole.thoughtasylum.com, and uses the same format as the standard Drafts scripting documentation. Each entry includes a simple code example illustrating the function. The home page of the sub-site also includes a full change log.

Wrap Up

Obviously if you are a Drafts user, I would highly recommend that you try everything out. Given the breadth of functionality, it is very likely there will be some actions that you will find useful, and that’s the point. The ThoughtAsylum Action Group Suite is intended to be a Swiss Army knife or toolbox of actions you can have on hand.

In addition, TADpoLe is intended to help make it easier for you to develop your own actions in Drafts. Once you are creating your own, I’m sure that some of the code it offers can help you speed up the development of your own bespoke actions.

Thanks to Alex (and Merlin) for spreading the word, and I really hope that folks find it useful. I look forward to continued development, and seeing what people do with it all in the future.


Thanks @sylumer! I’ve been playing with your actions a lot recently, they’re a great help!

1 Like