Help with workaround to import Outlook email

In my workplace I no longer have access to the Legacy version of Outlook. To import emails into DT, I am using Save As… to move the email to the DT global Inbox. (Drag and drop from Outlook to a destination in the Sorter does not work). Then I hope to use a Smart Rule to munge the record name with regex in DT and then invoke the group selector to manually choose a destination for the record. Currently my trigger is set to On Demand. My embedded AppleScript in the smart rule is not working, the record does not get moved after I select the destination. Note that I do not have Hazel nor the permission to install it.

on performSmartRule(theRecords)
	tell application id "DNtp"
		repeat with theRecord in theRecords
			set theGroup to display group selector
			move theRecord from inbox to theGroup
		end repeat
	end tell
end performSmartRule
move theRecord

Needs to be:

move record theRecord

I have little experience with the new version of Outlook, so I can’t comment on that.

Just so you know, using the On Import event trigger with this smart rule is going to lead to obnoxious behavior, with the group selector popping up after you save a file to this folder. It would be better if you can define a filing strategy for the smart rule.

The fix is often such a simple thing. Thanks for that.

It would be better if you can define a filing strategy for the smart rule.

Acknowledged, but this is how things functioned with Legacy Outlook and was efficiently invoked with a keyboard shortcut to a script in Services. The new workaround with Save As and the On Import trigger is slower. There are too many different destinations for my incoming emails to bake the strategy into the smart rule.

A small step to mimic the way things worked with Legacy Outlook, I discovered I can use System Event scripting to set my custom Category label on the currently selected message then invoke Save As to manually save it to the global Inbox.

tell application "System Events"
	tell process "Microsoft Outlook"
		tell menu bar 1
			tell menu bar item "Message"
				tell menu "Message"
					tell menu item "Categorize"
						tell menu "Categorize"
							click menu item "Sent to DevonThink"
						end tell
					end tell
				end tell
			end tell
		end tell
		
		click menu item "Save as..." of menu "File" of menu bar 1
		
	end tell
end tell