Querns can be automated by Mechanisms. To adapt a Quern for automation, craft a Rind from Wrought Iron on an Tier-3 Anvil. The Rind acts as a mount for the Millstone and goes in the handstone slot of the Quern. Next, craft a Millstone and place it on the top of the quern by right-clicking. Attach a powered axle to the Millstone to turn the Quern. It will now automatically grind items that are placed in it.
Hoppers placed below a Quern will not remove items until either grinding stops, or when there is a full-stack of items in the quern's second output slot.