Compressing, Docx Saving and De-duplicating Word Files

How do I create a workflow that looks at a Microsoft folder and if documents exist that are Word2 doc older than 97-2003 to be saved as Word docx.
Furthermore, if any files are larger than 50Mb they to be compressed. Lastly, Remove duplicates by identifying the latest version and excluding drafts. Finally once that cleaning process is done I want to run those final reports through a OpenAI assistant to extract some meta data. But how do I start building a workflow for this first part?