Assign a tag to items matching regex - plug-in

I can’t help you with the script here, but what could work if you have a mac somewhere is what is described here:

You’d send the items to the omnifocus email with the “@Agendas“ for the tag and “::MyProject” for the project.