Using automator and AppleScript to move a file to a different folder and subfolder based on name and content of a file
Thanks to @Solar Mike, I've tried line by line and found how to do it.
My code :

on run {input, parameters}
    set theFile to input as text
    set yearName to ((characters 34 thru -1 of theFile) as string) --trim first 35
    set yearName to ((characters 1 thru -22 of yearName) as string) --trim last 23
    set monthName to ((characters 39 thru -1 of theFile) as string)
    set monthName to ((characters 1 thru -19 of monthName) as string)
    set destinationFolder to ("Macboot :Travail en cours:Google Drive:Company:Comptabilité:" &amp; yearName &amp; ":" &amp; monthName &amp; ":Compte Transferwise 1:Relevé PDF + fichier CSV:" as text)
    tell application "Finder"
        activate
        move theFile to destinationFolder -- use "copy source_file to folder (target_folder as alias)" to copy the files
    end tell
    set result to {yearName, monthName, theFile, destinationFolder}
    return result
end run


The problem from my early attempt was just with "copy" copying the name, not the file. But as I need it to be moved, now it's good.