Check this out “Pass files on to external scripts depending on a defined set of rules”: Workflow external scripts - Apps - App Store - Nextcloud
Also you can tag file first via this app Files automated tagging - Apps - App Store - Nextcloud and then use workflow app from above with corresponding tag.
I did not catch this. Could you please describe use case?