Pneumatic Cylinders and Proximity Sensors

Hey folks, I’m brand new to the forum and don’t really know much of anything with regard to automation. That being said, I’m trying to automate a process that feeds lengths of bar stock into a machine. Essentially, I want to install a hopper that drops a length of round bar stock into a guide channel with a proximity sensor mounted to sense the bar stock. I want that proximity sensor to actuate a pneumatic cylinder that pushes the bar stock forward, advancing it for the end machine to take hold. Once the proximity switch stops sensing the bar stock in the channel, I want the pneumatic cylinder to retract back home and wait for the hopper to drop the next length of bar stock, activating the proximity switch and starting the loop again.

What I need help with is linking the proximity sensor on the guide channel to the pneumatic cylinder. What would that arrangement look like? Would need some type of electronic solenoid(?), If so, can anyone make any recommendations?

I appreciate the help.