Help with PDF to Image Quick Action (Please)

Hi,

I’m working on a quick action to convert a single-page PDF into a jpg. I’ve got to this point, and I’m a bit stuck:

I can’t find an option to put the new image in the same folder as the original PDF. I can dump the new image to a different folder, but then I’d have to manually move it back (which somewhat defeats the point of automating the process).

Eventually I’d like to tie the quick action to a Hazel automation, but first steps first. Any help gratefully received!