Page 1 of 1
Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 4:12 am
by rachsmac
I have set up a workflow whereby I drag my read emails into a number of "mailboxes" in mac mail. I then have an app called email archiver which exports them as PDFs into mboxs of the same name. Hazel then has rules for each mbox which renames the emails according to date, name of sender or recipient etc., depending on whether it is a sent email, received email or what and then files them in the relevant files for me on my external hard drive.
When new emails are added to the mbox files Hazel will recognise them because the log tells me that it has matched the files in the subfolders but for almost all of them it doesn't then go onto rename them and file them. It does do that for three folders, there is no difference in the rules that are set up and if I run the rules manually on each file it works perfectly.
How can I get Hazel to be doing this automatically?
Also I am finding that Hazel is running very slowly when I want to open Hazel, view rules etc., I often get the rainbow spinning wheel and it crashes on me quite regularly.
Help please.
Re: Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 10:18 am
by a_freyer
Do you have a series of rules operating in the same folder? For example, do you have different rules to rename files, different rules to move files, different rules to sort files?
If so, Hazel may be intentionally delaying between matching each file to subsequent rules. It may do this in order to prevent infinite looping.
Re: Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 12:53 pm
by Mr_Noodle
First off, I think we should address the slowness and crashing. How many of these rules do you have? For the crashes, go into your Library/Logs/Diagnostic Reports folder and send me any files there for System Preferences. Pick out the recent ones that correspond with recent crashes.
Re: Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 1:11 pm
by rachsmac
Hi Mr_Noodle
I have 39 of these folders (cringe) as well as 6 other folders that Hazel monitors and runs rules on. I had wondered if this number was causing the problem but couldn't find anything online that said there was a limit to the number of rules that Hazel can manage.
There are 10 crash logs over three days - the period that I was trying to set up these rules. Is there an email address that I could send them to?
Hi a_freyer
Yes I currently have four rules on each folder
1. go into subfolders
2. rename and file received emails
3. rename and file sent emails
4. rename and file emails I've forwarded to myself (e.g blog pages, recipes etc)
I still need a fifth rule for Hazel to rename an file the attachments
I've left it several hours and Hazel doesn't seem to click into to the rename and file bit. If Hazel is intentionally delaying is there anyway to stop it doing that? Kind of defeats the purpose of automation when you have to run 20 rules manually!
Re: Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 1:14 pm
by a_freyer
Whoa. Can you explain why you need 39 rules? If you type out a few rules here, surely we can help reduce that to a single, or just a few rules.
Re: Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 1:56 pm
by rachsmac
Yeah, I know. It all comes down to the filing system, I couldn't figure out another way to ensure that the files end up in the right places. So I'll try to explain the system. Here goes.
I am working towards the paperless office thing and have both work files and personal files on my computer. So for home I have files for things like:
- receipts and invoices
- workflow ideas
- gardening
- projects
etc.,
For my work I have quite a number of files one for each major area of responsibility.
I keep everything to do with these subjects in these files, emails, scans, text documents, pdfs etc., Having to manually save emails into the correct files is a right hassle. I don't want to keep them in the mail programme for two reasons: 1. I want the emails filed in context with all the other documents on that project, 2. I only have a mac air 2gb memory & just over 60 GB storage. So I have ended up putting these files on an external hard drive (yes I know that defeats the purpose of having the amazing speed of a mac air but I love it's portability and I can't afford to upgrade).
So when emails come in I read them, deal to any needed actions and then simply drag and drop them to a mailbox which has the same name as the project folder that I would like them filed in. I run Email Archiver at the end of the day and it files them all into corresponding archives. I could just let them stay there but as I said I want them in context in their relevant folders. Email Archiver has a fairly involved folder structure: each mbox has subfolders for year, then subfolders for month, then the emails, it then creates further subfolders for the attachments for the emails (that's the bit I haven't gone back to and figured out yet). So I need Hazel to file all the emails in the "garden" mbox for example into my "garden" folder on my external harddrive.
The rules that I have running on each mbox are:
1. Go into subfolders
If all of the following conditions are met for the file or folder bing matched:
Kind is Folder
Run rules on folder contents
2.Rename Received and File
If all the following conditions are met for the file or folder being matched
Kind is: PDF --this excludes the log files that email archiver puts in there
Authors do not contain: (my name)
Rename with pattern: authors - date created - title extension
Move to folder: Garden
3. Rename forwards and file
If all the following conditions are met for the file or folder being matched
Authors contain: (my name)
Contents contain: To: (my name)
Kind is: PDF
Rename with pattern: RM - date created - title extension
Move to folder: Garden
4.Rename Sent and File
If all the following conditions are met for the file or folder being matched
Kind is: PDF
Authors: contain (my name)
Contents do not contain: To: (my name)
Rename with pattern: recipient email address - date created - title extension
Move to folder: Garden
Re: Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 2:00 pm
by a_freyer
Are the mailboxes and the folders on your external always the same?
Re: Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 2:03 pm
by rachsmac
no but I could ensure that they are if I need to
Re: Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 2:33 pm
by Mr_Noodle
In Hazel's "Info" section, click the "Contact Support" button. There you can paste in/attach any dumps. Thanks.
Re: Hazel rules not running automatically

Posted:
Thu Jun 20, 2013 2:48 pm
by rachsmac
Okay thanks for that, I've sent them through
Re: Hazel rules not running automatically

Posted:
Wed Jul 10, 2013 11:46 pm
by rachsmac
Hi all, just wondering if anyone had any ideas how I can get rid of all these watched folders and make this workflow simpler??
I had another go at it and thought I had come up with the answer but couldn't make it work.
What I need to be able to do is get Hazel to move my documents based on the name of the folder a couple of levels up.
For eg., If my watched folder is:
Documents/EA2//Mail/V2/Mailboxes
The folder structure under that would look like this
folder: receipts
folder: 2013
folder: 7
file: [name]
so what I need to do is be able to tell Hazel to move my file to a destination determined by the name of the first folder (receipts)
I tried the rule: if all of the following conditions are met for the file or folder being matched: file pathname contains receipts
Do the following to the matched file or folder:
Move to folder ....
But this didn't seem to work I also tried contains /receipts/ but that didn't work either
Any suggestions please!!!
Re: Hazel rules not running automatically

Posted:
Thu Jul 11, 2013 4:20 pm
by Mr_Noodle
You might want to try using "enclosing folder" (search the help) though I'm not sure if you'll be able to nest enough to get up to the folder you want. Otherwise, you may need to use a script for this.