I collect a lot of files to my inbox – mostly bookmarks but also emails and pdfs. I would like automate the way I process these files using AI. I’d like to create a workflow that does the following across a all files in my inbox
Access the contents of the file or bookmark
Summarize the contents as 1 sentence finder comment
Add tags suggested by AI
Rename the file as suggested by AI
Then create a summary of all the files processed.
I can accomplish some of this by working on individual files in combination with built in chat functions (ie. Add Tag Suggestion to Document”) or interacting with the chat box but that only works on individual files; not as a group of files.
Is there a way to automate this process with a smart rule or apple/javascript.
NOTE: I’ve tried working with the built in chat to help me develop this process but they fail to run – particularly with bookmark files – It can’t load a bookmark link to summarize content.
Is the workflow I describe possible?
And what is easiest way to develop – I’d like to avoid a complex apple/javascript unless someone here has already has a similar workflow I can customize.
The easiest approach for the first 4 steps is to use these actions for a smart rule or batch processing configuration but the summary might include 1 or 2 sentences:
The embedded AppleScript isn’t overly complicated. The choice of AI model has an effect on the result, though I fine-tuned the prompt so it should be usable by different ones, the preference being commercial providers for performance.
Note: I was using this with Claude 4 Sonnet at the beginning but switched to Gemini 2.5 Flash for its brevity in responses. YMMV, depending on the AI model so the prompt may require personalized tuning.
Note 2: It’s writing to a document in the root of the Inbox of the database of the document. It’s using the child class (partly as an example of the syntax). In the current state of things, if you move this summary document on the same day, a new one will be created in the root. Logically, this can be modified if one wanted to.