  We construct motivic $\ell$-adic representations of $\GQ$ into exceptional
groups of type $E_7,E_8$ and $G_2$ whose image is Zariski dense. This answers a
question of Serre. The construction is uniform for these groups and uses the
Langlands correspondence for function fields. As an application, we solve new
cases of the inverse Galois problem: the finite simple groups
$E_{8}(\FF_{\ell})$ are Galois groups over $\QQ$ for large enough primes
$\ell$.
