Prapathaka 5 of the Seventh Kanda of the Taittiriya Samhita of the Yajur Veda describes cows performing a Yagna called the Gavam Ayana to obtain horns:
The cows performed that Sattra, being hornless, with the desire, 'May horns be born to us.' For ten months they performed it, and then horns were born, and they ceased (the rite), (saying), 'We have obtained (our desire).' Then those whose horns were not born ceased (the rite) after making up the year, (saying), 'We have obtained (our desire).' Both those which obtained horns and those which did not ceased, (saying),'We have obtained (our desire).' The year is the cows' Sattra , and those who knowing thus perform the year (sacrifice) are prosperous. Therefore a hornless cow has pleasure during the two months of the rainy season, for that is won for it by the Sattra. Therefore whatever is done in the house of one who performs for a year (a Sattra), that is done completely, successfully, and adequately....
The cows performed that Sattra, being hornless and desiring to obtain horns. For ten months they performed it, and then horns appeared. They said, 'We have gained (them), let us cease (the rite), for we have attained the desire for the sake of which we began (the rite).' But others said, either half of them or as many as might be the case, 'Let us perform (the rite) for these months, the eleventh and the twelfth, and when we have made up the year, let us cease' . In their case their horns grew in the twelfth month. Whether by faith, or by lack of faith-that is, those which have no horns-both indeed were prosperous, those which gained horns and those which won strength. He who ceases after ten months is prosperous, and he who ceases after twelve also, if he knows thus. They go by their feet, and he who goes by his foot attains (what he seeks). The Ayana is successful, and therefore is it productive of cows.
The Aitareya Brahmana of the Rig Veda says much the same thing:
The cows being desirous of obtaining hoofs and horns, held (once) a sacrificial session. In the tenth month (of their sacrifice) they obtained hoofs and horns. They said, "wehave obtained fulfilment of that wish for which we underwent the initiation into the sacrificial rites. Let us rise (the sacrifice being finished)." When they arose they had' horns. They, however, thought, " let us finish the year," and recommenced the session. On account of their distrust, their horns went off, and they consequently became hornless (tupara). They (continuing their sacrificial session) produced vigour (urj). Thence after (having been sacrificing for twelve months and) having secured all the seasons, they rose (again) at the end. For they had produced the vigour (to reproduce horns, hoofs, &c. when decaying). Thus the cows made themselves beloved by all (the whole world), and are beautified (decorated) by all.
He who has such a knowledge makes himself beloved by every one, and is decorated by every one.
The cows may have propitiated Brahma through the Gavam Ayana, resulting in him appearing before them and granting them a boon.