The use of scandium(III) triflate and ytterbium(III) triflate-catalysed Friedel-Crafts alkylation to insert a set of hydroxymethyl pyrrole amide tags (1b-i) on to polystyrene resins under mild conditions and the encoding of a split and mix peptide library is demonstrated.