Help with opening a pdf in photoshop as part of an Automator workflow

Hi,

I’m putting together an automator workflow. I select a pdf, the workflow saves a low res pdf and a jpg of page 1 to a new location.

I’m having trouble at the part where I want to open my low res pdf in photoshop to save page 1 as a jpg.

With my limited knowledge, I think the best way to do this is with the ‘run applescript’ action, so that I can set up open options.

Is anyone able to help me with this, please? I don’t know how to tell photoshop what file to work on.

on run {input, parameters}
	
	tell application "Adobe Photoshop CS6"
		activate
		--Open what exactly? It needs to run on the file passed to it by automator.
		set openoptions to {page:1, resolution:72}
		save current document as jpg
		return input
	end tell
end run

Thanks heaps in advance!

Photoshop CS6, Acrobat Pro x