Notifications would only appear when DEVONthink is not the frontmost application.
Please see my post directly above yours
Thanks @BLUEFROG that explains it ! I was looking for them to appear in DT as the rule is completed !
Youāre both welcome.
A Display Alert action will display in DEVONthink.
Hi there @Blanc Yes all the smart rules in the list are now on import. here is a screenshot
I have changed all the M&S occurrences to Marks and Spencers as attached rule
Iāll try another run of the script.
No it didnāt work. I didnāt even get pdfās. the conversion rule has 3 next to it because I imported 3 e-mails but no pdfās were produced.
Edit
When I look at the log it says I have reimported the emails. I had deleted the emails from the groups and reimported them so maybe thatās causing a problem. I donāt have any new receipts !!
Had you emptied the trash? You should be able to reimport as new if the email is deleted from the group and the trash is emptied
No I hadnāt emptied the trash ! I have now though and tried again. I got PDFās but not the second part.
Did the rules show that a document matched the criteria (i.e. show a 1 next to the name of the rule)? When looking at the two rules you posted above, I see that the M&S rule contains a āFromā condition; whilst the E-Mail will contain a sender, the PDF probably wonāt; as such, the criterium should be āContentā matches; and as I suggested previously, try both Marks and Spencer and āMarks and Spencerā; the same for any other rule which contains more than one term in any Content matches condition.
To better bug fix this, letās concentrate on one specific e-mail and rule; if possible, letās test with that one specific mail each time - that should make things more predictable. Remember to delete the mail in DT and empty the trash before each new test.
Iāve altered the Marks and Spencer rule to be content matches Marks and Spencer as that always appears at least once in the email.
Yes the rules had 1 in their titles so the pdfās were recognised
Ok, I will testnow just with the Marks and Spencer rule
OK, The .eml file is in trash. I have a pdf in the in box. The marks and Spencer rule has a 1 in its title.
ok; now please try altering the rule so it uses Content matches āMarks and Spencerā (so enclosing the term Marks and Spencer in "). Delete the pdf, empty the trash, and import the mail againā¦ Weāll get there in the end
Added the inverted commas. Just the same pdf created and 1 in the rule title
Ok, thanks. Iāve got an idea, Iāll play with it tomorrow evening and get back to you. Thanks for persevering
Itās many thanks to you for helping me with this, I really appreciate it and just sorry to have caused a bit of a problem ! Please, there is absolutely no rush !
Itās my intention we get to the bottom of this I need to send myself some e-mails and reenact what you are doing to see what it going on. My basic tests worked, and itās not obvious to me why things arenāt working for you. As I said, I have an idea though. I spent last night at a major incident before going on shift this morning, so Iām not going to get round to testing until tomorrow. But test I will!
Please donāt stress about it there is absolutely no rush. Please enjoy your weekend.
Dorothy
Iāve found the problem ; in your first rule (with the script), you have a Move to Trash action; that action is unnecessary, as the script moves the file to trash of its own accord. For whatever reason that extraneous action is inhibiting further rules from running. Please remove that Move to Trash action from the rule.
I have successfully tested with the above rules (the first contains the script posted above, which your rule already contains). You can leave the additional On Demand trigger in the first rule if you want, Iāve tested that too. Also, you might want to add a Mark as Read action in the second rule; if you do so, it needs to go between the Change Name and Move actions.
PS (for anybody passingā¦): if the second rule moves the record to a group within the same database as the search criterium for that rule, then Exclude Subgroups needs to be selected. @Dorothy you can select Exclude Subgroups in your second rule(s); so long as once the rule has run it no longer displays a 1 next to the rule title you donāt need to, though.
PPS note I use a Cancel action at the end of the second rule; if you are not expecting any other rules to run on the record, then I think using a Cancel action is a good idea. Cancel says ādonāt run any other rules on this recordā - which can be helpful and make things more predictable when playing with new rules down the line. Either way, itās good to be aware of whether further rules can or cannot run after a rule has triggered.
@blanc thank you so much ! You have cracked it ! I took out the move to trash action then added mark as read to the Marks and Spencer rule and tested it with just that one receipt and it worked.
Then I tested it with three different receipts and they were all filed automatically in the correct groups. Fantastic !
Iām not sure Iām understanding about the cancel action. I quite often have two or three receipts from different companies imported at the same time. In that case is it best to leave out the cancel action or have I misunderstood that bit ?