Sunnah.com : Book 3, Hadith 50
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِذَا قَالَ الإِمَامُ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ فَقُولُوا اللَّهُمَّ رَبَّنَا لَكَ الْحَمْدُ فَإِنَّهُ مَنْ وَافَقَ قَوْلُهُ قَوْلَ الْمَلاَئِكَةِ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ "
Yahya related to me from Malik from Sumayy, the mawla of Abu Bakr, from Abu Salih as-Samman from Abu Hurayra that the Messenger of Allah (ﷺ) said, "When the imam says, 'Allah hears whoever praises Him,' say 'O Allah! Our Lord, praise be toYou, 'for the previous wrong actions done by the one whose utterance coincides with that of the angels are forgiven."
Full reference and source
Sunnah.com : Book 3, Hadith 50 USC-MSA web (English) : Book 3, Hadith 50 Arabic : Book 3, Hadith 197
View source on Sunnah.com (opens in a new tab)