The invention provides compounds, pharmaceutical compositions comprising such compounds and methods of using such compounds to treat or prevent diseases or disorders associated with or mediated by G protein-coupled receptors, in particular G protein-coupled receptor 120.