Import into specific DT folder

Not sure if this has been answered before (i tried searching…). Is there a way to configure a folder action that imports files
into a specific group in DT?



Not sure if anyone is interested, but I found my own solution to this after looking at a couple of applescripts examples:
Now when I add a new file to a folder, Devonthink launches and prompts to select a group in which to import the file into.
I use this for sorting my research pdfs.

Save this into the folder action script folder:

on adding folder items to this_folder after receiving added_items
tell application “DEVONthink Pro”
repeat with theItem in every item of added_items
set thePath to theItem as text
set theDestination to display group selector “Destination” buttons {“Cancel”, “OK”}
tell application “DEVONthink Pro” to import thePath to theDestination
end try
end repeat
end tell
end try
end adding folder items to