Moving Repeating Evening Tasks in Things 3 Automtically

Things 3 is my go-to task manager. It doesn't overwhelm me or entice me into deeper and deeper fiddling like OmniFocus did; however, it requires some tweaking to meet my needs. Things 3 has a really cute "Evening" section for your tasks, but there is no way to set repeating tasks to always be Evening tasks.

While googling about this, I found lots of other discussions on how to handle that, and I have landed on this Repeating Evening Tasks AppleScript from Coding Bull Junky.

If you have looked for Things 3 automation online, you may have seen this script before. I am linking it and posting my modified version below to try to expand the searchability for future me or anyone else who may be looking to have repeating evening tasks.

I have modified it for my purposes and have an AM and PM tag. Each morning my mac mini will run the script (EDIT: FYI, you must either have your mac always on, or schedule it to awaken before running this script. My mac mini is always on as a media server) and move evening tasks to the evening zone, and most pleasingly, it will move morning tasks to the today view. These tasks are already on the today view, but moving them has the effect of putting them at the top of the today view :relieved: Now I can add Things widgets on iOS which show morning tasks at the top of my today list, so I remember to do them before leaivng the house :person_in_lotus_position:t2:

-- run first thing in the morning, e.g., from cron
-- https://codingbulljunky.wordpress.com/2018/08/16/repeating-evening-tasks/
-- https://github.com/benjamineskola/things-scripts/blob/master/evening.applescript

tell application "Things3"
	set theToken to "YOUR TOKEN"
	
	set theTodos to to dos of list "Today"
	repeat with aTodo in theTodos
		set tagList to tags of aTodo
		repeat with aTag in tagList
			if (name of aTag as text) is "☀️am" then
				if class of aTodo is project then
					set urlCommand to "update-project"
				else
					set urlCommand to "update"
				end if
				
				set theUrl to "things:///" & urlCommand & "?auth-token=" & theToken & "&id=" & (id of aTodo as text) & "&when=today"
				open location theUrl
			else if (name of aTag as text) is "🪐pm" then
				if class of aTodo is project then
					set urlCommand to "update-project"
				else
					set urlCommand to "update"
				end if
				
				set theUrl to "things:///" & urlCommand & "?auth-token=" & theToken & "&id=" & (id of aTodo as text) & "&when=evening"
				open location theUrl
			end if
		end repeat
	end repeat
end tell

You can get your auth token following these steps:

Authorization

For security reasons, commands that modify existing Things data require an authorization token to run. This prevents malicious links from modifying your data. This token should be passed as the parameter auth-token along with the other parameters in the command. You can find your unique token in Things’ settings:

  • On the Mac, go to ThingsSettingsGeneralEnable Things URLsManage.
  • On iOS, go to SettingsGeneralThings URLs.
1 Like

I was looking into a way to do this in Shortcuts App and use the automation to do this daily

1 Like

Let me know if you need any help! Shortcuts I can't really speak to, but this has been working perfectly for me and has been helpful getting things done before leaving the house for the day, or going to bed for the night. I use this in conjunction with the Things widget on iOS. In the mornings with my "good morning" focus, it shows me only AM tasks for Today. In the evening only evening tasks. etc.

Here is how I trigger it:

And for example here are the widget settings for my evening focus:

Since my Mac isn't consistently powered on, I decided to use Shortcuts. I created a time-based automation that moves all my "Today" scheduled items to the "Evening" at a specific time I set.

image

1 Like