With Greater Invisibility you'd gain advantage regardless of flanking and the rules for flanking don't say anything about you or your ally being visible or taking actions to gain the benefit of flanking, your ally just needs to be CAPABLE of attacking or w/e, everything else everyone else is...
With Greater Invisibility you'd gain advantage regardless of flanking and the rules for flanking don't say anything about you or your ally being visible or taking actions to gain the benefit of flanking, your ally just needs to be CAPABLE of attacking or w/e, everything else everyone else is...