A search is presented for the production of new heavy quarks that decay to a 𝑍 boson and a third generation Standard Model quark. In the case of a new charge +2/3 quark (𝑇), the decay targeted is 𝑇→𝑍𝑡, while the decay targeted for a new charge −1/3 quark (𝐵) is 𝐵→𝑍𝑏. The search uses a dataset corresponding to 20.3 fb−1 of 𝑝𝑝 collisions at 𝑠√=8~TeV recorded in 2012 with the ATLAS detector at the CERN Large Hadron Collider. Selected events contain a high transverse momentum 𝑍 boson candidate reconstructed from a pair of oppositely-charged same-flavor leptons (electrons or muons), and are analyzed in two channels defined by the presence or absence of a third lepton. Hadronic jets, in particular those with properties consistent with the decay of a 𝑏 hadron, are also required to be present in selected events. Different requirements are made on the jet activity in the event in order to enhance the sensitivity to either heavy quark pair production mediated by the strong interaction, or single production mediated by the electroweak interaction. No significant excess of events above the Standard Model expectation is observed, and lower limits are derived on the mass of vector-like 𝑇 and 𝐵 quarks under various branching ratio hypotheses, as well as upper limits on the magnitude of electroweak coupling parameters.