tl;dr:
Current documentation is not correct:
https://confluence.atlassian.com/jirakb/how-to-configure-mail-handler-for-a-sub-directory-in-outlook-gmail-1101934494.html
For Gmail labels (nested or direct) use:
TECH_DEPARTMENT/QA
Leaving my notes downthere - may be helpful for someone in similar case.
Assuming that we are configuring own mailhandler on Google Gmail server with below structure of labels:
(Please note that INBOX is a default label. And if you create "TECH_DEPARTMENT" it is not nested inside INBOX, but at the same level as INBOX!)
While configuring mail handler, you can specify folders (well, gmail labels) which can be read for fethcing emails. However TEST button which appears on second configuration screen is working in different ways if we configure Mail Server as IMAP or via OAUTH.
Atlassian Support unfortunately sends links to mentioned article at the top, which is misleading.
In both configurations mentioned above (imap / oauth) emails are fetching correctly from subfolder (ekhm, gmail labels)