One-pot access to a library of structurally diverse nicotinamide derivatives via a three-component formal aza [3 + 3] cycloaddition.