"Things for Things" - an Action Group for Things

I’m really proud to share the Action group I made to add your drafts to things. This is a group that I’ve personally been using and refining for about a year now.

I’ve been disappointed in the past with script-heavy Things actions that rely on parsing your draft for due dates, projects, etc, and usually require you to use very specific syntax. This group has none of that. This is focused on taking the content of your draft and quickly putting it into a place in Things. Need to do this thing today? Just hit the “Today” action. Need to do on a specific date? Choose “Pick a Date,” and type when it needs to be done.

This is very tailored to how I use Things. For instance, there’s an “Add to Work” action and an “Add to House” action that assumes you have those projects or areas in Things. If you don’t, your to-do will simply land in the inbox. Those are really meant to be customized to choose the projects or areas you add things to the most.

The “Pick a Project” action is the most complicated one, and assumes you have a Draft with a list of projects that matches that of things. This was super tricky for me to build, and I relied a lot of the Drafts community to help making it. Thank you!

Anyway, hope some Drafts/Things users find this one useful.

https://actions.getdrafts.com/g/1bt

7 Likes

Hey @tommertron that’s great!
A big THANKS to you

I love it, especially the actions that link back to drafts.

I was not aware that the callback actions are so powerful- thought you might script more for that kind of actions.

some ideas as of first glimpse:

  • fix „pick a project“ by adding a add „project list draft“
  • do not process empty lines for „bunch of todos“
  • maybe add a json file for some customisation like in the work and personal actions like this https://actions.getdrafts.com/a/1bu

do not get me wrong - you did marvellously- mika a drafts hero!

Thanks!

Actually “Bunch of Todos” was someone else’s action that I just added to this group and renamed. The scripting in that is beyond my abilities to make or work with. Sorry I should have been a little clearer that (apart from “Pick a Project”) many of these are actions I found in the directory and repurposed.

Pick a Project’s project list is actually populated by Keyboard Maestro on my Mac, as the only way to access a list of projects in Things is via AppleScript. It runs once a day and populates the source draft file on my Mac (as well as a text file for another KM macro to use.)

Aah, that makes totally sense.

There is no need to excuse. I really love the actions and learned another thing about combining scripts and custom template tags (thanks @sylumer).

I love the light weight approach of your actions and am inspired to do some experimenting (thus my ideas).
The json configuration in the iCloud really adds up the game. It is nice to define the work area or tags in a common place (and maybe change it over time if needed without changing the actions for that)

Keep sharing!

1 Like

I just updated a few changes. Descriptions of actions have been updated and tweaked actions so they are all callbacks and all include a link to original draft. And added a couple of new actions:

  • “This Evening” adds it to, well, this evening
  • “Make a Project” turns your draft into a project with the body as notes. It also adds that project to the project list that “Pick a Project” references so it’s there for that (if you update the UUID on both.)

I thought about trying a script for Make a Project that looks for lines with to do brackets or something and adds them as new to do’s to the project, but I felt like it went against the ethos of my action group to avoid memorizing syntax to use in your draft. Make a Project opens up the project you just created so you can add relevant notes in as tasks from there.

NICELY done … installed and working … the ‘pick a project’ and ‘make a project’ actions gave me errors - and then I read the instructions😄

1 Like

Awesome! So cool to see someone else is actually making use of this. It’s actually become my main drafts action list.

1 Like

I really love the way that Drafts becomes the Inbox for everything and I can channel out my tasks to Things3 and the Information to my Zettelkaten.

Your actions are a really great tool set to help me with that.

thanks

This is super useful. I’ve been trying to make an action group like this for so long. Thanks for sharing! I have one question though, how do you prevent empty drafts from being sent to Things?
For example, triggering an action on an empty Draft creates a new task in Things. I use the following script in front of every action to throw an error if the Draft is empty and it cancels the process. Does anyone now if there’s a better way to do this?

if (draft.content.length == 0){
  throw new Error("Draft is empty!");
}

I don’t really do anything explicit. The Prompt step has an option for a cancel button that by default will stop all other actions if it’s pressed, so that’s what would stop the action if you choose to cancel. Otherwise it will just pass whatever’s in the draft to Things without checking if it’s null.

1 Like

Ah thanks for your reply, i’ve just reread my comment and the example i’ve described is not accurate, I apologise. The cancel button is working correctly. The issue i find is when i accidentally trigger an action on an empty Draft (i have just corrected my previous comment).

no need zero apologise.
We are of a nice forgiving kind.

Your idea is good though and I would also do it with a prompt. Maybe a info or message (app.displayErrorMessage(message: string) )should do the trick.

throw is not really working on my test script

there seems to be no exit() or cancel() not even in the script object. that might be the place to put it by @agiletortoise if he is willing to listen to me :slight_smile:

another idea would be to queue the concrete action only if the script is not empty. I could hack something together if you are interested but do not know what I mean.

The error message prompt looks much better thanks for the tip. This is good enough for me and I can wait for the cancel or exit functionality to hopefully be added one day.

I think I know what you mean about queueing the action but I don’t know how to create that kind of script, if you can find the time I’d love to see it.

ok, sure thing.
I found it yesterday and am eager to test it

I posted it here https://actions.getdrafts.com/a/1cL

It will need the “Inbox” action of the “Things for Things” group

 if( draft.content.length != 0 )
 {
    let action = Action.find("Inbox");
    // queue to action to run after the current action
    app.queueAction(action, draft);
 }
 else
 {
   app.displayInfoMessage("Empty Drafts found. Noting to send to Things3");
}

Great example! I didn’t even know the app.queAction existed. Much appreciated thank you. This has me thinking of lots of different use cases…

1 Like

I completely
Combining different actions is a nice feature