Move all files to destination folder (strip out subfolders)

Is there a way in automator to select a folder that has a nested hierarchy, and dump just the files into a destination? Can’t seem to figure out how to tell Automator to do this, but I’m totally new.

Thanks! Would make my workflow a lot easier.

Or maybe I should be doing this in AppleScript? Is there a way to add an AppleScript to an Automator Action? (Just so I can right-click it in the Finder).

There may be something obvious I’m missing here.

The following is the workflow I came up with.

[Ask for Finder Items]
{Type: Folders}

[Get Folder Contents]
{Repeat for each subfolder found}

[Choose from List]

[Copy Finder Items]
or
[Move Finder Items]

–The “Choose from List” selection is a bit clunky but functional, just de-select the folders themselves. There’s probably a slicker way to do it in Applescript.

–Also you may want to add a couple steps for cleanup of the Folders that get left behind (not copied or moved).

[Ask for Finder Items] (specify same folder as in the first step)
{Type: Folders}

[Move Finder Items to Trash]

Hope this helps.