PurposeThis research aims to develop a robust deep-learning approach for classifying emotion in social media.Design/methodology/approachThis study integrates three deep learning techniques: Bidirectional Gated Recurrent Units (BiGRU), convolutional neural networks (CNN) and an attention mechanism, resulting in the Bidirectional Gated Recurrent Units Convolution Attention (BiGRU-CNN-AT) model. The BiGRU captures potential semantic features, the CNN extracts local features and the attention mechanism identifies keywords critical for classification.FindingsThe BiGRU-CNN-AT model outperformed several state-of-the-art emotion classification algorithms. The model was compared against various baselines across multiple emotion datasets, with deep learning methods consistently surpassing traditional approaches. BiGRU and Bi-LSTM networks demonstrated superior performance, particularly when combined with attention mechanisms. Additionally, analysis of execution times indicated that the BiGRU model processed data more efficiently. They were configuring hyperparameters and integrating GloVe word embeddings, which significantly enhanced model performance, with the adam optimizer proving effective for optimization.Originality/valueThis paper contributes to the development of a novel framework, BiGRU-CNN-AT, which integrates bidirectional GRU, CNN and attention mechanisms for text-based emotion classification. By leveraging the strengths of each component, this framework significantly enhances accuracy in emotion classification tasks. Furthermore, the study offers comprehensive experimental analyses across multiple emotion datasets.