There are several works which reduce the solution of the Schroedinger equation on quantum graphs to the study of some discrete operators, see e.g. S. Alexander, Phys. Rev. B27 (1983) 1541; J. von Below, Linear Alg. Appl. 71 (1985) 309; P. Exner, Ann. Inst. H. Poincare 66 (1997) 359; C. Cattaneo, Mh. Math. 124 (1997) 215; K. Pankrashkin, Lett. Math. Phys. 77 (2006) 139, etc. Nevertheless, they all assume some specific boundary conditions at the points of gluing, like Kirchhof, delta or delta' couplings. We show that a similar reduction can be done for a much larger class of boundary conditions and even for structures which are more general than quantum graphs, i.e. hybrid manifolds etc. The contribution of external interactions like magnetic field or spin-orbit coupling is also demonstrated.