We report on the synthesis of various glucose-responsive microgels based on N-alkylacrylamide derivatives and phenylboronic acid (PBA) as a glucose sensing moiety. Depending on their chemical composition, the microgels exhibit opposite behaviors in response to glucose concentration increase: they can either swell or shrink, using two different mechanisms for glucose recognition. Both behaviors may be suitable for glucose sensing and insulin delivery. When glucose binds a single boronate receptor, the microgel swells as glucose concentration increases. This mechanism can be used to deliver a drug by diffusion through the network. In other cases, glucose binds specifically to two boronates, which creates additional cross-links within the network and provokes shrinkage. Such systems are promising for the development of sensors with improved selectivity and also as potential 'intelligent' valves in microfabricated delivery systems. By a rational choice of the constituting units of the network structure, we show how to favor one or the other type of response to glucose variation. Therefore, glucose-swelling microgels operating under physiological conditions have been obtained by copolymerization, with an appropriate choice of alkylacrylamide monomer, and boronate derivative. At a pH above the pKa of the boronic acid derivative, the same structures shrink in response to glucose concentration. The nature of the cross-linker is a key parameter to enable this dual behavior. In other microgels, an amine group is introduced in the vicinity of the boronic acid, which lowers its pKa and favors microgel contraction at physiological pH. This work has allowed us to give some general rules to control the swelling/shrinking behavior of glucose-responsive microgels.