Script to collect PDF

Hello there,
just wondering if it is possible and how complicated would be to create a script that collect PDFs based on a list of keywords.

In a real life situation, Devonthink is hosting all our PDFs divided in Groups x each issue (we’re a magazine). Now each time a new issue comes out we do manually search Devonthink with a list of all our advertisers in order to find out which companies were mentioned in the editorial.

Let’s say I run a search for company “A” on a September issue. If there’s a mention for company A I will export those PDFs and email them to the CEO of company A.
And so on for company B, C, D …

This is a long process and I’m wondering how complicated would be to create a script on a new issue containing already a list of all the companies I have and if the script find a reference it will export those PDFs automatically in a Folder called Company A … Company B … Company C …

In that way the easy job will only be of emailing the files.

Or even better … if at a company A, B, C you can assign a contact email and the files will automatically attach to an email and sent.

Thanks for your reply

Best,
A

IMO, this wouldn’t be a complex script, though you’d want to debug it on your own system. But why not tag your PDFs with the company names and use smart groups to collect the relevant PDFs – smart groups can be limited to a specific group and specific tags. A lot faster and more flexible than writing a script.