Smart rule to convert Feed into formatted note and send to a inbox


I’m trying to make a Smart Rule to convert selected Feed or Feeds into Formatted Note but seems doing nothing and nothing appears on Log Window… Edit: what I mean is I select a Feed, right click and select Apply Rules and select this one and nothing happens. Well, the window loses the focus and the document is not selected anymore.

Could you tell me what is wrong with it and if there is a way to debug this kind of scripts?


Are you referring to an actual feed? You can’t convert a feed. You can convert feed articles, ie. the HTML files delivered by the feed.

Sorry, yes, I’m talking about a feed article.

I’m filing a bug on the use of inbox, as it doesn’t seem to be working as expected.

Also, while @cgrunenberg would have to clarify on whether criterion are required, you have no matching criteria. I always define a matching criterion just as you do with a smart group, like Kind is HTML.

This points to the inbox of the current database and works as expected when using the criterion mentioned above.

on performSmartRule(theRecords)
	tell application id "DNtp"
		repeat with theRecord in theRecords
			convert record theRecord to note in (incoming group of current database)
		end repeat
	end tell
end performSmartRule
1 Like

The parameter is wrong - inbox is a database but the “in” parameter expects a record (e.g. incoming group).

Jimm, you are right, to make it work rule mst have a match criterion to work. And of course, your script works as expected.

My next question is how to assing a keyboard shortcut to that. Doing in Keyboard System Preferences (as we can do with other menu items) seems not working.

And to extend this: is any possibility to assign a keyboard combination to a script?

Attaching a hotkey to a script is possible in the system prefs, but you…

  1. Must make sure you enter the same name
  2. That name must be unique in the menus. This is why you’re likely running into issues with adding a smart rule hotkey. The smart rules are listed in two menus: Tools > Apply Rule and Tools > Perform Rule. Which would get the hotkey??
    PS: Due to the presence of the rule in Perform Rule I would NOT suggest trying to hotkey it.
1 Like

This should work. Assign keyboard shortcuts to any menu

1 Like