Background: Near-barrier fusion can be strongly affected by the coupling between relative motion and internal degrees of freedom of the collision partners. The time-dependent Hartree-Fock (TDHF) theory and the coupled-channels (CC) method are standard approaches to investigate this aspect of fusion dynamics. However, both approaches present limitations, such as a lack of tunnelling of the many-body wave function in the former and a need for external parameters to describe the nucleus-nucleus potential and the couplings in the latter. Method: A method combining both approaches is proposed to overcome these limitations. CC calculations are performed using two types of inputs from Hartree-Fock (HF) theory: the nucleus-nucleus potential calculated with the frozen HF method, and the properties of low-lying vibrational states and giant resonances computed from the TDHF linear response. Results: The effect of the couplings to vibrational modes is studied in the $^{40}$Ca$+^{40}$Ca and $^{56}$Ni$+^{56}$Ni systems. This work demonstrates that the main effect of these couplings is a lowering of the barrier, in good agreement with the fusion thresholds predicted by TDHF calculations. Conclusions: As the only phenomenological inputs are the choice of the internal states of the nuclei and the parameters of the energy density functional used in the HF and TDHF calculations, the method presented in this work has a broad range of possible applications, including studies of alternative couplings or reactions involving exotic nuclei.