The indole presents an acidic hydrogen on the nitrogen atom, with pKa= 17. Using strong bases it can be deprotonated, forming the indolium anion.
Reaction of indolium with different electrophiles:
a) Rental:
b) Opening of epoxides:
c) Attack to a,b -unsaturated:
The bases that release lithium or magnesium cations into the medium (organolytic and magnesium) block the free pair of nitrogen, producing the attack through the ring.
As can be seen in the previous example, the indole with the blocked nitrogen pair attacks through its 3 position, it is an electrophilic substitution.
The 1-substituted indoles have acidic hydrogens in position 2, which we can remove using strong bases (organolitics).
An acid hydrolysis step protonates the carboxylate.