First coffee beans were not officially brought/gifted to India but were smuggled.
In 17th century, Arabs were very protective of their coffee industry.
In those days, they exported roasted or baked coffee beans to other parts of the world so that none could grow them.
Once, Indian Sufi Baba Budan went to Mecca on Haj pilgrimage.
He first came across coffee as a dark liquid that was being served to other guests like him at Mocha, a port city of Yemen.
He found the drink refreshing.
It also helped him to make his devotion deep.
In his eagerness to grow coffee himself at home, Baba Budan strapped seven coffee beans to his chest to avoid having them confiscated on his way.
He brought exactly seven beans because the number 7 is considered sacred in Islam.
After returning to India, Baba Budan planted those seeds in the courtyard of his hermitage in Chikmagalur, Karnataka.
The coffee plants gradually spread as backyard plantings, and later on to the hills of what is now known as Baba Budan Hills.