DT & Things, MindNode, Spark and Bear

Oh, I see what you’re saying. We’re in agreement–there’s still a constellation of apps that I need to get through my day, for sure. The more DT can index, the easier those searches will be though.

1 Like

I’ve had great success over the past couple of years with integrating DT and Things.

I augmented the “Add to Things” smart rule so that it also updates the selected DT item(s) with a custom metadata (called “todolink”) that is the callback URL of the newly created item in Things. This way I can easily find the Things item from the DT item, and (importantly) I can identify whether a DT item already has a corresponding Things item.

I also created a DT smart rule called “incoming todo”. This rule runs the smart rule above on any newly imported item that has the tag “todo” and doesn’t already have a Things url in the “todolink” metadata.

With this, I can quickly import files from any source and tag those which need to be in Things. The items created in Things include the callback URL to the DT items. It’s working great for me. I’m happy to share the script and the smart rule setup if anyone is interested.

I thought about also trying to reflect the “done” state of the Things item in DT, but haven’t found a need for that.

1 Like

Neat! Please share!

Here is my edit of the “Add to Things” script that updates the selected DT item(s) with a custom metadata (called “todolink”) that is the callback URL of the newly created item in Things:

tell application "Finder" to set pathToAdditions to ((path to application id "DNtp" as string) & "Contents:Resources:Template Script Additions.scpt") as alias
set helperLibrary to load script pathToAdditions

try
	-- Get the selection
	tell application id "DNtp" to set thisSelection to the selection
	
	-- Error handling
	if thisSelection is {} then error localized string "Please select a document or group, then try again."
	my addToThings(thisSelection)
on error errmsg
	display alert (localized string "Error when adding item to Things") message errmsg
end try

on addToThings(thisSelection)
	repeat with thisItem in thisSelection
		-- Get and format the data we need
		tell application id "DNtp"
			try
				set customMD to custom meta data of thisItem
				set theToDoLink to mdtodolink of customMD
			on error
				set theToDoLink to {}
			end try
			if theToDoLink is {} then
				set theSummary to (name of thisItem) as string
				set theURL to ("[url=" & reference URL of thisItem & "]" & name of thisItem & "[/url]") as string
				
				
				-- Add new to do to Things
				try
					tell application "Things3"
						set newToDo to make new to do with properties {name:theSummary, notes:theURL}
						set newToDoURL to ("things:///show?id=" & id of newToDo)
					end tell
					tell application id "DNtp"
						set thisItem to first item of thisSelection
						add custom meta data newToDoURL for "todolink" to thisItem
					end tell
				on error errmsg
					display alert (localized string "Things is not available.")
				end try
			end if
		end tell
	end repeat
end addToThings

And here is a screenshot of the smart rule that runs this script on any newly imported item that has the tag “todo” and doesn’t already have a Things url in the “todolink” metadata: