I believe Invocable apex can be called from the action sequence “Run Data Source Actions” and variables passed in, but the APEX must be invocable.
Your APEX code has to be written in invocable annotation. If it is, then when you click the drop down arrow in that field it sill appear as an option and allow you to define your inputs. If it is not written in invocable notation, then it will not show in the drop down.
It looks like you're new here. If you want to get involved, click one of these buttons!