This study addresses the urgent need of the Attorney General's Office of the State of Bahia (PGE) to automate the classification of initial petitions, a challenge exacerbated by the lack of standardization in file naming. To tackle this issue, the work proposes the implementation of advanced Deep Learning models, aiming to overcome the limitations of the currently used approach based on regular expressions (Regex), which shows an average accuracy of 80%. The research compares the efficacy of a hybrid model, integrating Convolutional Neural Network (CNN) with Long Short-Term Memory (LSTM), and the BERTimbau model, with the goal of not only enhancing the precision in identifying these essential documents but also promoting procedural efficiency through automation. Preliminary results reveal that the CNN-LSTM model achieved an accuracy of 99.34%, while BERTimbau obtained 98.51%, demonstrating the great potential of both techniques in optimizing the judicial workflow in the digital era.