We consider Schrödinger operators on compact and noncompact (finite) metric graphs. For such operators we analyze their spectra, prove that their resolvents can be represented as integral operators, and introduce trace-class regularizations of the resolvents. Our main result is a complete asymptotic expansion of the trace of the (regularized) heat-semigroup generated by the Schrödinger operator. We also determine the leading coefficients in the expansion explicitly.