In this post, I am going to walk through an Apple Shortcut with a corresponding automation that cleans up my download folder.
Workflow: Monitor a folder; Downloads and depending on the extention of the file placed there, automatically move it to a subfolder inside Downloads . I created App Installer, Video Files, Documents, Zip Files, & Images.

Short Cut
- First thing we want to do is launch
Shortcutson you macOS device. - Name the
Shortcuton the Top Left of the screen. - Now on the right, type
Get contents ofand drag it to the left. - Choose the
Downloadfolder - Next, search for
Repeat with each itemand drag it right under theGet content - Next we will search for
ifand drag it to the left. - You want to choose
File extentionis and I addedjpg,jpeg,JPG,JPEG,PNG,png,heic,HEIC,webp,WEBP - Then search for
Move Fileto the left, then choose the folder forimages

Now under the Otherwise, Add another if and repeat the next file extension.

When you finish adding all the file types, you should have the end ifs as seen below. You can test it by hitting the play button

Automation
Now we will create the automation. Go back into the Shortcuts app and on the top left, choose Automation and choose the + sign on the top right.

Next lets set up the following:

- Choose your
Downloadsfolder - Ignore the subfolders because you can have a loop. Once the file is moved, you have gotten the expected results.
- When items are
addedalthough you CAN addModifiedand orRemoved - Then
Run immediately. You can have it ask you for confirmation if you’d like. - Hit
Nextwhere it will ask you for theShortcutyou want to run.

In my case, its Clean Up Download Folder
You should now see somthing like this

You can play around with other shortcuts to delete files older than 30 or 60 days as an example.
Hope this helps.