Unintentionally creating duplicates in Devonthink

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I'm using Hazel in conjunction with Devonthink, to import files into specific Devonthink groups via an Automator action that comes packaged with Devonthink. I'm frequently seeing some strange behavior, where the file is correctly moved into Devonthink, but then a second copy of the file is also moved into Devonthink, along with its initial folder structure (so if the file is in a Hazel-monitored folder called "Action," then the entire Action folder is also moved into Devonthink. Even stranger, on several occassions, I've even had my entire Desktop folder (not monitored by Hazel) moved into Devonthink, after I drag one file from the desktop into my Hazel-monitored "Action" folder.)

I thought this might be an Automator issue, but I removed Hazel from the equation (by selecting the file outside of a Hazel-monitored folder, and manually running the Automator action), and things work fine.

Here is my Hazel recipe:

Image


And this is the Automator action:

Image


Any insight into this would be greatly appreciated.

Thanks,
Evan
cyberskier
 
Posts: 3
Joined: Fri Sep 06, 2013 9:24 am

Noticed your related DEVONtechnologies User Forum topic:

Duplicate Automator/Hazel import
sjk
 
Posts: 332
Joined: Thu Aug 02, 2007 5:43 pm
Location: Eugene

My immediate thought here would be the first item in your workflow. Which is get selected items.
That function "gets" whatever is currently selected in the finder.
So when hazel runs, it is actioning the workflow, which is then "getting" whatever you currently have highlighted in the finder.

It looks to me with the rules you have, that hazel is not feeding the file into the workflow. It is simply telling the workflow to run and then automator is grabbing files on its own.

I wouldn't be confident telling you an answer without playing around with it, but my first guess would be to save the workflow as an application in automator, change hazel to open the file with that application instead of just running the workflow, and then you might have to edit the workflow a bit to accept input files. Or maybe not.

good luck!
Skeo
 
Posts: 31
Joined: Mon Jan 02, 2012 7:53 pm

Awesome, Skeo! I think you hit the nail on the head, or so it seems in my limited testing. I'll have to test out if converting the Automator workflow to an application is enough to fix this. If not, I don't know enough about Automator to tweak things.
cyberskier
 
Posts: 3
Joined: Fri Sep 06, 2013 9:24 am

Yes, make sure any Automator workflow you use with Hazel takes files as input as Hazel will pass it in.
Mr_Noodle
Site Admin
 
Posts: 11230
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support