Let G = (V, E, w) be a finite, connected graph with weighted edges. We are interested in the problem of finding a subset W ⊂ V of vertices and weights aw such that 1for functions f : V → R that are 'smooth' with respect to the geometry of the graph. The main application are problems where f is known to somehow depend on the underlying graph but is expensive to evaluate on even a single vertex. We prove an inequality showing that the integration problem can be rewritten as a geometric problem ('the optimal packing of heat balls'). We discuss how one would construct approximate solutions of the heat ball packing problem; numerical examples demonstrate the efficiency of the method.2010 Mathematics Subject Classification. 05C50, 05C70, 35P05, 65D32.