Greenland past temperature history can be reconstructed by forcing the output of a firn-densification and heat-diffusion model to fit multiple gas-isotope data (δ15N or δ40Ar or δ15Nexcess) extracted from ancient air in Greenland ice cores using published accumulation-rate (Acc) data-sets. We present here a novel methodology to solve this inverse problem, by designing a fully-automated algorithm. To demonstrate the performance of this novel approach, we begin by intentionally constructing synthetic temperature-histories and associated δ15N datasets, mimicking real Holocene data that we use as “true values” (targets) to be compared to the output of the algorithm. This allows us to quantify uncertainties originating from the algorithm itself. The presented approach is completely automated and therefore minimizes the "subjective" impact of manual parameter-tuning, leading to reproducible temperature-estimates. In contrast to many other ice-core-based temperature-reconstruction methods, the presented approach is completely independent from ice-core stable-water-isotopes, providing the opportunity to validate water-isotope-based reconstructions or reconstructions where water isotopes are used together with δ15N or δ40Ar. We solve the inverse problem T(δ15N, Acc) by using a combination of a Monte-Carlo-based iterative approach and the analysis of remaining mismatches between modelled and target data, based on cubic-spline-filtering of random numbers and the laboratory-determined temperature-sensitivity for nitrogen isotopes. Additionally, the presented reconstruction approach was tested by fitting measured δ40Ar and δ15Nexcess data, which leads as well to a robust agreement between modelled and measured data. The obtained final mismatches follow a symmetric standard-distribution-function. For the study on synthetic data, 95 % of the mismatches compared to the synthetic target-data are in an envelope between 3.0 permeg to 6.3 permeg for δ15N and 0.23 K to 0.51 K for temperature (2σ, respectively). In addition to Holocene temperature-reconstructions, the fitting approach can also be used for glacial temperature-reconstructions. This is shown by fitting of NGRIP δ15N data for two Dansgaard-Oeschger events using the presented approach, leading to results comparable to other studies.