Automator workflow errors in Hazel

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

Moderator: Mr_Noodle

Automator workflow errors in Hazel Wed May 30, 2012 11:17 pm • by ladyfractal
So I'm seeing rather strange behavior. I have an Automator workflow that I'm calling from Hazel. When a PDF file is written to my Downloads directory, Hazel calls the workflow. The workflow calls Devonthink Pro, opens a database, selects a group and then imports the PDF file into Devonthink. When I run the workflow in Automator it works perfectly fine. All the right things happen. Yet, when Hazel calls the workflow I get the following:


Code: Select all
2012-05-30 19:20:00.430 hazelworker[3799] Error executing Automator workflow /Users/adavis/bin/workflows/import pdf files to devonthink pro.workflow: Error Domain=com.apple.Automator Code=-212 "The action “Find Finder Items” encountered an error." UserInfo=0x100256710 {NSLocalizedDescription=The action “Find Finder Items” encountered an error., NSLocalizedRecoverySuggestion=Check the actionʼs properties and try running the workflow again., NSLocalizedFailureReason=-[NSAppleEventDescriptor count]: unrecognized selector sent to instance 0x400187860}
2012-05-30 19:20:00.899 hazelworker[3799] [Error] Automator workflow failed: Error executing automator workflow /Users/adavis/bin/workflows/import pdf files to devonthink pro.workflow on file /Users/adavis/Downloads/30 geo engineering rabe borick.pdf.


The Workflow looks like this:

Launch Application Devonthink Pro--->Open Devonthink Database <path to database>--->Set Current DevonThink Group--->Find Finder Items in Downloads WHERE Kind is PDF--->Get Specified Finder Items--->Add Items to current group.

I don't know what I'm doing wrong and it seems to be something with how Hazel is seeing this workflow. The only thing I can think of is that maybe Hazel is expecting a return code or something and because there's so many actions, it's timing out. However, I tried splitting the workflow in two so that the Find Finder and Get Specified Finder items are their own little workflow and that calls another workflow which runs the Devonthink actions but that didn't work either.

Hazel fires the event fine. The workflow run within Automator runs fine. Whatever is happening seems Hazel-specific.

Any ideas? Thanks in advance.
ladyfractal
 
Posts: 5
Joined: Fri Mar 16, 2012 3:25 pm

Re: Automator workflow errors in Hazel Thu May 31, 2012 4:47 pm • by Mr_Noodle
I'm guessing the problem is you are using the "Find Finder Items" action. Hazel passes in the file in question so you don't need to have Finder searching for files.
Mr_Noodle
Site Admin
 
Posts: 11257
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron