Dubaa bint Zubayr came to the Prophet ﷺ and said, "Messenger of Allah, I want to perform Hajj, so should I make a conditional intention?"He replied, "Yes."She asked, "How should I say it?"He said, "Say, 'Here I am, O Allah, here I am. The place where I exit ihram from the earth will be wherever You detain me.'"
حدثنا زياد بن أيوب البغدادي حدثنا عباد بن عوام عن هلال بن خباب عن عكرمة
أن ضباعة بنت الزبير أتت النبي ﷺ فقالت يا رسول الله إني أريد الحج أفأشترط قال نعم قالت كيف أقول قال قولي لبيك اللهم لبيك لبيك محلي من الأرض حيث تحبسني
[Its chain of transmission is hasan]. Abu Dawud narrated it in the Book of Hajj Rites, chapter on stipulating conditions in Hajj, no. 1776, from the hadith of Abbad bin Awwam, through this same chain. Muslim narrated it, no. 1208, from the hadith of Ikrima, through this same chain. It is agreed upon (by Bukhari and Muslim) from the hadith of Abu Usama, from Hisham bin Urwa, from his father, from Ayesha, through this same chain.On this topic there are also narrations from Jabir [Bayhaqi 5/222], Asma bint Abu Bakr [Ibn Majah, no. 2936], and Ayesha [Bukhari, no. 5089, and Muslim, no. 1207/105].