How to reactivate a project that is done or abandoned using OMNI Automation?

Using the Shortcuts app, I want to look for a project with a specific text in the title. If it exists, I want to reactivate it if it’s done or abandoned in order to then add tasks in the following steps of the workflow.