Hello, I'll add a description of my partial scenario which I may benefit from lists/dictionaries/tables, depending on how they're implemented.
I'm trying to sort incoming pdf files based on their content and append them to the appropriate "master" output pdf file (I want a single file with all the electric bills for each property, etc). In abstract:
if file contains "NE Electric" and ["bill" or "statement"] and "78 Main St" then extract statement DATE, (rename file to "DATE - 78 Main - Electric Bills", save file to folder "OriginalScans", append file to "Properties/78 Main - Electric Bills.pdf"
if file contains "Penn Water" and ["bill" or "statement"] and "78 Main St" then extract DATE, (rename file to "DATE - 78 Main - Water Bills", save file to folder "OriginalScans", append file to "Properties/78 Main - Water Bills.pdf"
if file contains "Penn Water" and ["bill" or "statement"] and "34 Cherry" then extract DATE, (rename file to "DATE - 34 Cherry - Water Bills", save file to folder "OriginalScans", append file to "Properties/34 Cherry - Water Bills.pdf"
and so on..
I would like the tokens/variables "Penn Water", "NE Electric", "34 Cherry Ave", "78 Main St" etc to be definable by me and available in all rules. I would also like to be able to define a dictionary so that if "78 Main St" is matched in the file content then i can map that to "Properties/78 Main" and "NE Electric" maps to "Electric", and ["bill" or "statement"] maps to "Bills" that i can use in constructing the name of the destination file for append.
Today i have about 90 of these master files and I cannot come up with a solution to accomplish this within Hazel without writing many individual rules. Ideally this would be a single rule driven by a list/table/dictionary.