“Allahumma inna na’udhu bika min sharri ma ursila bihi (O Allah, we seek refuge with You from the evil of that with which it is sent).” Then if it rained he would say: “Allahumma sayyiban nafi’an (O Allah, a beneficial rain),” two or three times. And if Allah dispelled it and it did not rain, he would praise Allah for that.
أَنَّ النَّبِيَّ ﷺ كَانَ إِذَا رَأَى سَحَابًا مُقْبِلاً مِنْ أُفُقٍ مِنَ الآفَاقِ تَرَكَ مَا هُوَ فِيهِ وَإِنْ كَانَ فِي صَلاَتِهِ حَتَّى يَسْتَقْبِلَهُ فَيَقُولُ اللَّهُمَّ إِنَّا نَعُوذُ بِكَ مِنْ شَرِّ مَا أُرْسِلَ بِهِ فَإِنْ أَمْطَرَ قَالَ اللَّهُمَّ سَيْبًا نَافِعًا مَرَّتَيْنِ أَوْ ثَلاَثَةً وَإِنْ كَشَفَهُ اللَّهُ ﷻ وَلَمْ يُمْطِرْ حَمِدَ اللَّهَ عَلَى ذَلِكَ