Abstract We construct a braided monoidal functor $J_4$ from Bobtcheva and Piergallini’s category $4\textrm {HB}$ of connected 4-dimensional 2-handlebodies (up to 2-deformations) to an arbitrary unimodular ribbon category $\mathscr {C}$, which is not required to be semisimple. The main example of target category is provided by ${H}\textrm{-mod}$, the category of left modules over a unimodular ribbon Hopf algebra $H$. The source category $4\textrm {HB}$ is freely generated, as a braided monoidal category, by a Bobtcheva--Piergallini Hopf (BPH) algebra object, and this is sent by the Kerler–Lyubashenko functor $J_4$ to the end $\int _{X \in \mathscr {C}} X \otimes X^*$ in $\mathscr {C}$, which is given by the adjoint representation in the case of ${H}\textrm{-mod}$. When $\mathscr {C}$ is factorizable, we show that the construction only depends on the boundary and signature of handlebodies and thus projects to a functor $J_3^{\sigma }$ defined on Kerler’s category $3\textrm {Cob}^{\sigma }$ of connected framed 3-dimensional cobordisms. When $H^*$ is not semisimple and $H$ is not factorizable, our functor $J_4$ has the potential of detecting diffeomorphisms that are not 2-deformations.