you joined a company in India and signed an agreement with them in India, therefore, you are eligible for gratuity as long as you worked for them....either in India or outside of India. by an amendment in 2018, the cap on the amount of gratuity payable has been removed. therefore you should claim gratuity as long as you worked for them, irrespective whether you were in India or abroad.
regards
I must add that the gratuity is calculated on the basis of the last drawn salary.