We consider a nonlinear Schrödinger equation (NLS)osed on a graph (or network) composed of a generic compact part to which a finite number of half-lines are attached. We call this structure a starlike graph. At the vertices of the graph interactions of δ-type can be present and an overall external potential is admitted. Under general assumptions on the potential, we prove that the NLS is globally well-posed in the energy domain. We are interested in minimizing the energy of the system on the manifold of constant mass (L 2-norm). When existing, the minimizer is called ground state and it is the profile of an orbitally stable standing wave for the NLS evolution. We prove that a ground state exists for sufficiently small masses whenever the ...