Shortcut Share Sheet Issues

I’ve created a shortcut to convert a PDF to black and white - it makes life easier marking up B+W PDF’s with colour arrows if it’s not clashing with the background!

Anyhow, the below shortcut works if I run it without selecting any PDF (as it then asks me to select one) and it works fine if I select a PDF and then run via the Finder > Services > Shortcut menu.

My issue comes if I use the share function in Finder as this then gives me the following error.

Screenshot 2023-01-27 at 09.16.10

Can anyone see anything glaringly wrong and why this might impact it? The share sheet is quicker to get to, so was probably more likely to be used.