Arylpyrroles and -indoles are electrosynthesized via a S(RN)1 type rea
ction. With pyrrolyl anion, the reaction leads mainly to alpha-substit
ution, but beta-substitution and disubstitution are also observed. Wit
h indolyl anion, the main product corresponds to beta-substitution. In
both cases, the yield of the main product is higher than 50%.