Compress files with the output name same as Parent Folder with Automator
In Automator:


Add Get Selected Finder Items 
Add Run Applescript


Inssert this code for the Applescript:

on run {input, parameters}
 set pathList to {}
 repeat with itemNum from 1 to count of input
 tell application "System Events"
 copy POSIX path of (container of (item itemNum of input)) to end of pathList
 end tell
 end repeat
 return pathList
end run


Output/Results:

2013-05-11 00:06:02 +0000: Get Selected Finder Items completed
2013-05-11 00:06:02 +0000: Conversion from Files/Folders to Files/Folders completed
2013-05-11 00:06:02 +0000: Run AppleScript completed
2013-05-11 00:06:02 +0000: Workflow completed

{"/Users/Desktop", "/Users/Desktop", "/Users/Desktop"}