Need Help with creating an Omnifocus Script

I’m new to the forum and do not know exactly where to find help with this. Omnifocus’ own forum seems to be locked to new registrations and I’ve enjoyed the Automators podcast for some time now.

I have a great workflow going so far with Omnifocus as GTD but I needed help in creating a script that will look at my inbox and flag or tag items that are old or haven’t been modified in quite some time. The goal is to have these items show up in my forecast perspective and to have the Shortcuts app run the script at like 11:59 PM.

Hope this makes sense.