The place of the intention is the heart, such that one has the firm determination and resolve when one is about to start (or before it) such that if asked one could reply without hesitation, “I am praying, such and such…” As the fuqaha note, it is rare that one’s actions can be bereft of this minimal intention.
Ibn `Abidin mentions that, linguistically, the intention is for the heart to resolve to do something. Formally, it is to firmly resolve to perform an action and to draw closer to Allāh, when initiating the action. [Radd al-Muhtar, Sunan al-Wudu, quoting Allama al-Quhustani and from al-Talwih of Imam al-Taftazani]
It should be noted, then, that there are three aspects to the intention: 1) the minimum legally valid intention, which is to firmly resolve to perform an action; 2) intention needed for reward, which is to also intend to draw closer to Allāh; 3) the time: it is a condition that the intention be made as one initiated the action, or just before it.
Ibn Abidin said:
“Making one’s worship sincerely for Allah alone is obligatory, and showing off in good works (riya’), which is to desire from it other than Allah, is prohibited by scholarly consensus (ijma`) because of the decisive texts that have been transmitted about this. The Prophet (Allah bless him and give him peace) called showing off in good works (riya’) the lesser shirk (polytheism). This intention [of drawing closer to Allah] is for achieving reward, not mere validity, for validity related to fulfilling the conditions (shurut) and performing the integrals (arkan), and the intention that relates to validity is to know in one’s heart which prayer one is performing. In Mukhtarat al-Nawazil [a fatwa collection] is says, ‘As for reward, it is related to the soundness of one’s resolve, which is through ikhlas (making one’s worship sincerely for Allah alone).’” [Radd al-Muhtar, 6: 425-426, Kitab al-Hadhr wa’l Ibaha, Bab al-Bay`, abbreviated.]
Sayyidi Ibn al-Arabi says in his What the Seeker Needs:
“Do everything you do in order to come close to your Lord in your worship and prayers. Think that each deed may be your last act, each prayer your last prostration, that you may not have another chance. If you do this, it will be another motivation for becoming heedful and also for becoming sincere and truthful. Allah does not accept good deeds done unconsciously and insincerely as readily as deeds done in consciousness and sincerity.”
Abdullah ibn al-Mubarak said, “How often it is that a small action is made great by its intention, and a great action is made small by its intention.”
Ibn Rajab al-Hanbali mentioned that the great Sufi, Fudayl ibn al-`Iyad explained Allah’s words, “That He may test which of you is best in action” (Qur’an, 67:2) by saying,
“That is, who is sincere in it and correct in it. And the action that is sincere but incorrect is not accepted. And if it is correct and insincere then it is also not accepted. It is only accepted when it is both sincere and correct. And it is only sincere when it is for the sake of Allah Most High, and correct when it is done according to the sunnah.”
Ibn Rajab then said, “And the proof of what Fudayl said lies in the verse, “So whosoever hopes for the meeting with His Lord, let him work righteousness and associate none as a partner in the worship of His Lord ” (Qur’an, 18:110) [Ibn Rajab al-Hanbali, Jami` al-Ulum wa’l Hikam, Hadith al-Niyya] May Allah grant us the success to seek Him, and Him alone.
To close, Mawlana Jalal al-Din al-Rumi said in his Mathnawi (6: 4302-3):
Passion makes the old medicine new:
Passion lops off the bough of weariness.
Passion is the elixir that renews:
how can there be weariness
when passion is present?
Oh, don’t sigh heavily from fatigue:
seek passion, seek passion, seek passion!
And Allah knows best.