Automator: Service to move files into new subfolders based on file extension *within any selected folder*
I've worked off the assumption that you will be selecting the actual folders in order to pass them to your Automator service workflow via, for example, the contextual right-click services menu.

Given this, here's what your service workflow would look like:



Here's the script that goes in the Run AppleScript action:

on run input
    set [input] to the input

    repeat with directory in the input
        organiseFilesOfFolder_(POSIX path of the directory)
    end repeat

end run

to organiseFilesOfFolder:f
    local f

    script SourceFolder
        use sys : application "System Events"

        property location : a reference to folder f of sys
        property name : (a reference to name of my location)

        script JPGs
            property folder : missing value
            property name extension : "jpg"
            property list : {}
            property id : "JPG"
        end script

        script RAWfiles
            property folder : missing value
            property name extension : "cr2"
            property list : {}
            property id : "RAW"
        end script

        script Videos
            property folder : missing value
            property name extension : "mov"
            property list : {}
            property id : "Video"
        end script

        script Edits
            property folder : missing value
            property id : "Edits"
        end script


        to make new "folder" given type:fileType
            [fileType's id, " - ", my name's contents]

            make new folder at my location ¬
                with properties {name:¬
                contents of result as text}

            set the folder of the fileType to the result
        end make

        on listOf:fileItems
            set the list of fileItems to (every file ¬
                of my location where its name extension ¬
                is the name extension of the fileItems)
        end listOf:
    end script

    tell the SourceFolder
        repeat with fileType in its [JPGs, RAWfiles, Videos, Edits]
            make new "folder" given type class:fileType
            if the contents of the fileType = its Edits then ¬
                exit repeat

            if (its listOf:fileType) is not {} then ¬
                tell application "System Events" to move ¬
                    list of fileType to the ¬
                    folder of the fileType
        end repeat
    end tell
end organiseFilesOfFolder: