First-principles calculations of $e$-ph interactions are becoming a pillar of electronic structure theory. However, the current approach is incomplete. The piezoelectric (PE) $e$-ph interaction, a long-range scattering mechanism due to acoustic phonons in non-centrosymmetric polar materials, is not accurately described at present. Current calculations include short-range $e$-ph interactions (obtained by interpolation) and the dipole-like Frohlich long-range coupling in polar materials, but lack important quadrupole effects for acoustic modes and PE materials. Here we derive and compute the long-range $e$-ph interaction due to dynamical quadrupoles, and apply this framework to investigate $e$-ph interactions and the carrier mobility in the PE material wurtzite GaN. We show that the quadrupole contribution is essential to obtain accurate $e$-ph matrix elements for acoustic modes and to compute PE scattering. Our work resolves the outstanding problem of correctly computing $e$-ph interactions for acoustic modes from first principles, and enables studies of $e$-ph coupling and charge transport in PE materials.