And whence is grace over meals derived? From (Devarim 8:10) "and you shall eat and you shall be sated" — this is the first blessing. "for the land" — this is the second blessing. "the good" — this is "who builds Jerusalem," viz. (Ibid. 3:25) "the good land … and the Levanon." "that he gave you" — who gave all good to us (this is the blessing of "hatov vehametiv").
Where Does the Obligation to Say Grace After Meals
Mekhilta Tractate Pischa 16:21