Smart Rule for meeting follow ups, action items etc

Hi all, new DEVONthink user. Wondering if anyone has a workaround for this. As part of my markdown note taking during meetings I typically use the following syntax:

?? - something to research/follow up on later
@@ - something delegated to someone else
!! - something important to review

I thought it would be really slick to be able to create a Smart Rule to automatically look for these in my notes and create OmniFocus actions based on them. It looks like searching for characters isn’t allowed however.

Does anyone do anything similar or have a recommendation for a workaround? Unfortunately my “muscle memory” is built up on these so simply changing it to something like zzFollowUp would take some time though I believe would accomplish what I am after.

Also - is it accurate you cannot search by emoji either (if I were to use the question mark emoji etc). I tried searching for the emoji itself as well as the unicode representation but neither returned results.

Why not use an applescript to search the meeting notes
My process is to generate individual task notes in DT

1 Like

Welcome @mtellin

Only alphanumerics and a few reserved characters - $€£¥%§ - are searchable.

Emoji cannot be searched for either.

Initially I didn’t consider that only because I wasn’t trying to introduce additional complexity if I didn’t need to. If I could just search those characters I’d have been good. Given that I can’t though I will totally look at this method. Sounds like you are already doing something similar? I don’t suppose you could share a sample that might get me started? I’m thinking it’d be something like:

All of the following are true: Date Modified is Last hour, then perform the action hourly and from that Execute the AppleScript.

I know Hazel has a rule along the lines of “since last match” that would probably work better for this but I don’t see that type of condition in the last, only other thing I’ll have to check (unless you have a sample) is how to get the notes contents from the script - I think in Hazel it uses like a $1 variable for the file you are interacting with.

Thank you! Bummer but if I can get the AppleScript method working DTLow mentions I don’t think it will impact me. Thanks for the response.

Here’s a rough sample
After writing up the meeting notes in a DT record,
I run this script to extract the action items (3.2 KB)

Screen Shot 2021-02-07 at 22.32.05

This script uses handler ParseText to return the action items
You identified your ?? @@ !! syntax; I made an assumption there would only be one line to extract for each item

Screen Shot 2021-02-07 at 22.34.35

Please don’t post captures of a script. A capture might seem to be easier for you, however that means everyone who wants to use your script has to either write it down or OCR it first.

The actual script, wrapped in three backticks and a new line for proper formatting, is much easier for other users and doesn’t take that much time, I think.



1 Like

Appreciate all the help, I don’t know what I’m missing but I cannot get a single script to execute successfully. I even have it right now just trying to show a dialog box and it’s not working. This should work right?

I don’t think it would matter but I am still on the trial version and haven’t purchased Pro yet, but I can use the AppleScript menu and successfully add tasks to OmniFocus that way so I don’t think it’s a feature/licensing thing.

No, I think it shouldn’t. In AppleScript, you always have to send messages to a certain application or object. Something like

tell Application id "DNtp"
display alert "WFM"
end tell

This is, btw, already predefined for you when you first click on “Edit Script” with “Embedded” selected. So you must have deleted the necessary stuff – why?

It is, I guess, rather a “read the documentation” thing. There’s a whole chapter on “Automation” in the Help installed with DT. That explains fairly well the structure of embedded scripts (smart rules) and normal scripts.

And as @pete31 said before: It would be a lot nicer to include the script code itself here in three backquotes like so:
<code goes here>
easier to copy, easier to read.

Got it, since it was one line I thought the picture was more appropriate to capture all the other context around what I was doing.

I had used DTLow’s script but wasn’t getting it to work so I just tried to make it simpler and simpler to see what was going on (which is how I ended up at that single line trying to display an alert).

I’ll keep tinkering and see if I can get something to display/work. Thanks for reply.

You should definitely sit down and read the documentation. The script posted before in this thread is not going to work with a smart rule. Not without modification, and all that is explained in the documentation.

A short example in JavaScript, not tested at all:

(() => {
  let app = Application("DEVONthink 3");
  let rec = app.selectedRecords()[0];
  if (!rec) return;
  let txt = rec.plainText;
  let markers = ['@@', '!!', '??'];
  markers.forEach(m => {
    let re = new Regexp(`^${m}\s+(.*)$`, "g");
	let resultArray = [...txt.matchAll(re)];
	resultArray.forEach(res => {
	  let txtForOmni = res[1];
	  // do something with it here

As the other script, it is not to be used in smart rule. Just select a record with the entries as described above and then execute the script from the script menu or script editor.