(Ambiya') 21 : 94
فَمَنْ يَعْمَلْ مِنَ الصَّالِحَاتِ وَهُوَ مُؤْمِنٌ فَلَا كُفْرَانَ لِسَعْيِهِ وَإِنَّا لَهُ كَاتِبُونَ

Then whoever does righteous deeds and he is a believer, his intentions will not be denied, and indeed We are Recording everything for him.

It is told in verse 53: 39: “And man has nothing except the deeds with intention. And his effort will be shown to him. Then he will be rewarded for it with the perfect recompense. Then everything will be returning into your Lord”. See explanation 3: 136; 17: 13-15 and 16: 97.