Nitrogen is the most crucial nutritional element during the vegetative growth stage of pineapple cultivation. In this study, nine machine learning techniques were validated to estimate the total nitrogen content in MD2 pineapple crops, using multispectral images, crop-installed sensors, and SPAD values representing leaf chlorophyll content. To introduce nitrogen variability, a complete randomized block experimental design was implemented, applying five different treatments in five blocks, each with 12 replications, over a period of 6 months in a pineapple crop located in Tauramena, Colombia. Image capture was carried out using a multispectral camera mounted on an unmanned aerial vehicle (UAV), while sensors integrated into an IoT platform collected data on ecological factors such as pH, temperature, solar radiation, relative humidity, soil moisture, wind speed, and wind direction. Total nitrogen values were determined by collecting leaf tissue samples, which were then sent to a laboratory for the corresponding analyses. Chlorophyll content was measured using the SPAD-502 plus device. For the implementation of machine learning models, the total nitrogen content served as an independent variable. The predictor variables included sensor data, SPAD values and statistical information generated from 16 vegetation indices computed from multispectral images. To reduce the dimensionality of the predictor variable data set, the Principal Component Analysis (PCA) was applied. After dimensionality reduction, nine regression algorithms were used to estimate the leaf nitrogen content in each of the four study periods. The results indicated that the MLP and XGB regressor algorithms showed the best performance metrics.