We propose a novel approach to facies classification based on a supervised machine learning algorithm. This approach allows for the automatic facies classification on a field scale based on an ensemble of Decision Trees algorithm associated with gradient boosting. Major steps of the workflow include data integrity assessment, data scaling, identification and correction of gaps in data, log processing, feature engineering, training, testing, and tuning the hyperparameters on the validated set of data. At the ultimate stage of the workflow, the algorithm accepts a set of well logs as an input and produces a discrete facies type as an output. This method substantially increases the quality of the facies classification, that is key to further geological modelling and dynamic simulation that help reduce drastically the risk of incorrect well planning, fracturing and other operations, thus avoiding a huge negative financial impact. The novelty of approach is related to the selection of machine learning algorithms that are best fitting the dataset, combined with a workflow to enhance the dataset itself.