Are you aware that Qajars invaded Azerbaijani Khanates in 1796? Before that, Azerbaijani Khanates were independent since the death of Nadir Shah (1747). During Qajar invasions, Azerbaijani Khanates requested assistance from Russian Empire. In 1805, the Treaty of Kurekchay was signed between Azerbaijani Khanates and Russian Empire, making the Khanates vassal of Russian Empire. This was recognized by Qajars in the treaty of Gulustan in 1813. As for Treaty of Turkmenchay in 1928, Qajars launched a military campaign to occupy northern Azerbaijan, but they were defeated, and also had to cede the Khanates of Irevan and Nakhchivan.
There were no Armenia btw, but Khanate of Irevan which was of Azerbaijani origin, actually, the Irevan Khanate itself was of Qajar tribe origin, although they belonged to a different clan (Ziyadlu) than Qajars which ruled Iran (Qovanlu). And present-day Armenia was mostly populated by Azerbaijani Turks.
Without even knowing the history, it is laughable to claim "Qajars were incompotent" in this particular case. Or claiming that they actually lost Northern Azerbaijan. You cannot lose something you don't own in first place. The Qajar authority over northern Azerbaijani Khanates lasted only briefly.