Sunan an-Nasa'i 1344
Grading supplied with this record: Hasan (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِنْ تَكَلَّمَ بِخَيْرٍ كَانَ طَابِعًا عَلَيْهِنَّ إِلَى يَوْمِ الْقِيَامَةِ وَإِنْ تَكَلَّمَ بِغَيْرِ ذَلِكَ كَانَ كَفَّارَةً لَهُ سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ "
It was narrated from Aishah that:
When the Messenger of Allah (ﷺ) sat in a gathering or prayed, he said some words, and 'Aishah asked him about those words. He said: "If he has spoken some good words (and he says this statement of remembrance), it will be a seal for them to preserve them until the Day of Resurrection, and if he has said something other than that, it (these words) will be an expiation for him: 'Subhanak Allahumma wa bihamdika, astaghfiruka wa atubu ilayk (Glory and praise be to You, O Allah, I seek Your forgiveness and I repent to You.)'"
Full reference and source
Sunan an-Nasa'i 1344 In-book : Book 13, Hadith 166 English translation : Vol. 2, Book 13, Hadith 1345
View source on Sunnah.com (opens in a new tab)