The script I showed here is just a reduced TC focused on the issue I’m having.
I’ve been spending the last 3 days learning and coding a script to be run as a Smart Rule in my inbox.
The script parses the text of PDF files that land into the inbox. I have a Smart Rule sending the list of new records (on import or move). The script retrieves the text of each record and send it to processors (6 of them so far) that use regex to sniff, add comments, rename and, finally, move the files to a group inside the inbox itself (different group, depending on the processor assigned for a specific file).
Anyway, that’s just the beginning. I hope to do much more in the future. But if the scripts don’t run as Smart Rules the whole concept (and work done so far) go to trash