Rifa bin Rafi reported,

We were praying one day behind the Messenger of Allah ﷺ. When he raised his head from the bowing, he said, "Allah hears whoever praises Him."A man behind him said, "Our Lord, to You belongs all praise, abundant, pure, and blessed praise."When the Prophet ﷺ finished the prayer, he asked, "Who was the one who spoke just now?"The man replied, "I did."The Prophet ﷺ said, "I saw more than thirty angels racing to be the first to record those words."

Azami 585

Sahih

عن رفاعة بن رافع الزرقي، قال

كنا نصلي يوما وراء رسول الله ﷺ فلما رفع رأسه من الركعة قال: سمع الله لمن حمده. قال رجل وراءه: ربنا ولك الحمد حمدا كثيرا طيبا مباركا فيه. فلما انصرف قال: من المتكلم آنفا؟ فقال: أنا. قال: رأيت بضعة وثلاثين ملكا يبتدرونها أيهم يكتبهن أول.

الأعظمي 585صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the angels
Section
Prompt action of the angels in recording righteous deeds
Numbering
Jami al-Kamil 585 (2nd edition)
Azami 585