Inserting a magnetic flux into a two-dimensional one-particle Hamiltonian leads to a spectral flow through a given gap which is equal to the Chern number of the associated Fermi projection. This paper establishes a generalization to higher even dimension by inserting non-abelian monopoles of the Wu-Yang type. The associated spectral flow is then equal to a higher Chern number. For the study of odd spacial dimensions, a new so-called 'chirality flow' is introduced which, for the insertion of a monopole, is then linked to higher winding numbers. This latter fact follows from a new index theorem for the spectral flow between two unitaries which are conjugates of each other by a self-adjoint unitary.