We present aluminium abundances for a sample of about 100 red giant stars in each of the Galactic globular clusters 47 Tuc (NGC 104) and M 4 (NGC 6121). We have derived homogeneous abundances from intermediate-resolution FLAMES/GIRAFFE spectra. Aluminium abundances are from the strong doublet Al i 8772-8773 Å, as in previous works done for giants in NGC 6752 and NGC 1851, and nitrogen abundances are extracted from a large number of features of the CN molecules by assuming a suitable carbon abundance. We added previous homogeneous abundances of O and Na and newly derived abundances of Mg and Si for our samples of 83 stars in M 4 and 116 stars in 47 Tuc to obtain the full set of elements from proton-capture reactions produced by different stellar generations in these clusters. By simultaneously studying the Ne-Na and Mg-Al cycles of H-burning at high temperature, our main aims are to understand the nature of the polluters at work in the first generation and to ascertain whether the second generation of cluster stars was formed in one or, rather, several episodes of star formation. Our data confirm that in M 4 only two stellar populations are visible. On the other hand, for 47 Tuc a cluster analysis performed on our full dataset suggests that at least three distinct groups of stars are present on the giant branch. The abundances of O, Na, Mg, and Al in the intermediate group can be produced within a pollution scenario; results for N are ambiguous, depending on the C abundance we adopt for the three groups.