Here's a page from a Greek schoolbook: http://ebooks.edu.gr/modules/ebook/show.php/DSDIM-F102/580/3784,16613/
The first orange box says, "These words [την, αυτήν, δεν, μην] keep their final -ν when the following word starts with a vowel or with one of the consonants κ, π, τ, one of the digraphs μπ, ντ, γκ, or one of the doubles(*) ξ, ψ."
(*) - not sure how to translate it - I believe it refers to letters that represent two sounds, i.e. /ks/ or /ps/ respectively.
So basically: when the next word starts with a vowel or with a plosive consonant, voiced or unvoiced (/b d g p t k/), including when that consonant is part of an affricate such as /ts dz ps ks/.