How to find out which file triggered an action from spotlight
Would something like this work for you:

on run argv
    set theFile to (item 1 of argv)
    set theFilePath to quoted form of POSIX path of theFile 
    -- your script using the parameters follows
end run


You could skip the first line and just pull off the path if you don't need to use the file itself later in the script.

Also, you'll really want to get ASObjC Runner to parse files and paths easily for 10.9 and older or BridgePlus for newer os.