Imam As Saadi said while explaining the narration of Umar Radiallahu anhu that indeed the actions are by their intentions:
“Thus by this it is known that this narration is inclusive of all the affairs of good. Thus it is befitting for the believer who wants safety and benefit for his soul that he understands the meaning of this narration, and that he acts in accordance to it as if it is in front of his eyes in all of his actions and times.”
[Bahjatu Quloob Al Abraar page 27]
Translated by
Majid Jawed Al-Afghanee
Abu Layl