CNN:
Hundreds of thousands of Indians provide a large proportion of Qatar’s more than 2 million strong foreign workforce – which accounts for 95% of labor in the gas-rich Gulf state
The CNN write-up doesn't say who they were allegedly spying for. Reuters says it was Israel:
The ruling comes as Doha is trying to negotiate with the Palestinian militant group Hamas for the release of over 200 hostages seized during its Oct. 7 rampage in Israel, which is pummelling Gaza with aerial strikes in response.
The case involving the eight Indians, who were working on a submarine project with a private company for the Qatari authorities, could also become a diplomatic headache for New Delhi, which depends heavily on Qatar for its natural gas needs.