Context. The Exploring Molecule Complexity with ALMA (EMoCA) survey is an imaging spectral line survey using the Atacama Large Millimeter/submillimeter Array (ALMA) to study the hot-core complex Sagittarius B2(N). Recently, EMoCA revealed the presence of three new hot cores in this complex (N3-N5), in addition to providing detailed spectral data on the previously known hot cores in the complex (N1 and N2). The present study focuses on N2, which is a rich and interesting source for the study of complex molecules whose narrow line widths ameliorate the line confusion problem. Aims. We investigate the column densities and excitation temperatures of cyanide and isocyanide species in Sgr B2(N2). We then use state-of-the-art chemical models to interpret these observed quantities. We also investigate the effect of varying the cosmic-ray ionization rate (ζ) on the chemistry of these molecules. Methods. We used the EMoCA survey data to search for isocyanides in Sgr B2(N2) and their corresponding cyanide analogs. We then used the coupled three-phase chemical kinetics code MAGICKAL to simulate their chemistry. Several new species, and over 100 new reactions have been added to the network. In addition, a new single-stage simultaneous collapse/warm-up model has been implemented, thus eliminating the need for the previous two-stage models. A variable, visual extinction-dependent ζ was also incorporated into the model and tested. Results. We report the tentative detection of CH 3 NC and HCCNC in Sgr B2(N2), which represents the first detection of both species in a hot core of Sgr B2. In addition, we calculate new upper limits for C 2 H 5 NC, C 2 H 3 NC, HNC 3 , and HC 3 NH + . Our updated chemical models can reproduce most observed NC:CN ratios reasonably well depending on the physical parameters chosen. The model that performs best has an extinction-dependent cosmic-ray ionization rate that varies from ∼2 × 10 −15 s −1 at the edge of the cloud to ∼1 × 10 −16 s −1 in the center. Models with higher extinction-dependent ζ than this model generally do not agree as well, nor do models with a constant ζ greater than the canonical value of 1.3 × 10 −17 s −1 throughout the source. Radiative transfer models are run using results of the best-fit chemical model. Column densities produced by the radiative transfer models are significantly lower than those determined observationally. Inaccuracy in the observationally determined density and temperature profiles is a possible explanation. Excitation temperatures are well reproduced for the true "hot core" molecules, but are more variable for other molecules such as HC 3 N, for which fewer lines exist in ALMA Band 3. Conclusions. The updated chemical models do a very good job of reproducing the observed abundances ratio of CH 3 NC:CH 3 CN towards Sgr B2(N2), while being consistent with upper limits for other isocyanide/cyanide pairs. HCCNC:HC 3 N is poorly reproduced, however. Our results highlight the need for models with A V -depdendent ζ. However, there is still much to be understood about...