Purpose The objective of this research is to examine the fundamental process through which task crafting connects online knowledge sharing with employee innovation. This study also analyzes the moderating effect of departmental support for innovation on the relationship between online knowledge sharing and employee innovation. Design/methodology/approach The data were gathered from 325 employees working in some industries in Vietnam. Structural equation modeling was used to analyze the data and evaluate the study hypotheses. Findings The findings confirmed the positive impact of online knowledge sharing on employee innovation, mediated by task crafting. Additionally, departmental support for innovation moderates the significant relationship between online knowledge sharing and employee innovation. Originality/value This research offers one of the earliest insights into how task crafting bridges online knowledge sharing and employee innovation. This study provides insights into how departmental support for innovation enhances the impact of online knowledge sharing on employee innovation.