Asymptotic approximations to the Green's functions of Sturm–Liouville boundary-value problems on graphs are obtained. These approximations are used to study the regularized traces of the differential operators associated with these boundary-value problems. Various inverse spectral problems for Sturm–Liouville boundary-value problems on graphs resembling those considered in Halberg and Kramer's ‘A generalization of the trace concept' (Duke Mathematics Journal27 (1960), 607–617), for Sturm–Liouville problems, and Pielichowski's ‘An inverse spectral problem for linear elliptic differential operators' (Universitatis Iagellonicae Acta Mathematica27 (1988), 239–246), for elliptic boundary-value problems, are solved.