Sunan Abi Dawud, Book 2, Hadith 458 (Abu Dawud 848)

Abu Hurairah reported the Messenger of Allah (ﷺ) as saying:

When the Imam says: “Allah listens to him who praised Him,” say: “O Allah, our lord, to Thee be the praise, “ for if what anyone says synchronises with what the angels say, he will be forgiven his past sins.