Muwatta Malik, Book 51, Hadith 11 (USC-MSA)

Yahya related to me from Malik from Suhayl ibn Abi Salih from his father from Abu Hurayra that a man of the Aslam tribe said, "I did not sleep last night." The Messenger of Allah, may Allah bless him and grant him peace, said to him, "For what reason?" He said, "A scorpion bit me." The Messenger of Allah, may Allah bless him and grant him peace, said, "Had you said in the evening, 'I seek refuge with the complete words of Allah from the evil of what He has created, 'it would not have happened." Audhu bi kalimati'llahi't-tammati min sharri ma khalaq.

وَحَدَّثَنِي مَالِكٌ، عَنْ سُهَيْلِ بْنِ أَبِي صَالِحٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَجُلاً، مِنْ أَسْلَمَ قَالَ مَا نِمْتُ هَذِهِ اللَّيْلَةَ ‏.‏ فَقَالَ لَهُ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ مِنْ أَىِّ شَىْءٍ ‏"‏ ‏.‏ فَقَالَ لَدَغَتْنِي عَقْرَبٌ ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ أَمَا إِنَّكَ لَوْ قُلْتَ حِينَ أَمْسَيْتَ أَعُوذُ بِكَلِمَاتِ اللَّهِ التَّامَّاتِ مِنْ شَرِّ مَا خَلَقَ ‏.‏ لَمْ تَضُرَّكَ ‏"‏ ‏.‏

sunnah.com

also referenced under: Book 51, Hadith 1743 (In-Book)