Involved in the biosynthesis of avenanthramide phytoalexins, which are phenolic alkaloids found mainly in oats (PubMed:31394723). Catalyzes the N-acylation of 5-hydroxyanthranilate with 4-coumaroyl-CoA or caffeoyl-CoA as acyl donors, forming avenanthramide A and avenanthramide C, respectively (PubMed:31394723). Does not accept feruloyl-CoA as a substrate (PubMed:31394723). (E)-4-coumaroyl-CoA + 5-hydroxyanthranilate = avenanthramide A + CoA (E)-caffeoyl-CoA + 5-hydroxyanthranilate = avenanthramide C + CoA Induced by the crown rust fungus Puccinia coronata and the phytotoxin victorin. Belongs to the plant acyltransferase family.