- Run Automator
- Select Service as the new document type
- Find Run AppleScript from the Library and drag into the workflow
- Copy the script code into the Run AppleScript action
- Save as Merge Folders
- Open System Preferences -> Keyboard -> Shortcuts
- Add key combination for merge folders service
- Select a folder
- From (context) menu select Services -> Merge Folders
I made some edits and this will work in Automator as a Quick Action:
on run {}
end run