We consider the Sturm-Liouville operator on quantum graphs with a loop with the standard matching conditions in the internal vertex and the jump conditions at the boundary vertex. Given the potential on the loop, we try to recover the potential on the boundary edge from the subspectrum. The uniqueness theorem and a constructive algorithm for the solution of this partial inverse problem are provided.