The series of molecular signals generated as a consequence of a G-protein coupled receptor binding to its physiological ligand, where the pathway proceeds through activation or inhibition of adenylyl cyclase activity and a subsequent change in the concentration of cyclic AMP (cAMP).