This study focuses on formulating an integration algorithm for manufacturing firms aiming to infuse the immense potential of Industry 4.0 technologies into lean manufacturing systems. The goal is to unlock and harness the advantages offered by these advanced technologies in an economically efficient manner. An analytic approach has been implemented in this investigation, examining a broad array of relevant empirical research. This comprehensive analysis serves to derive a universal algorithm predicated on the principles of both lean methodology and Industry 4.0. The complexities and challenges of amalgamating lean methodology and Industry 4.0 have been scrutinized meticulously in this study. The study elaborates on the extent to which Industry 4.0 technologies can augment lean production practices, delves into the difficulties encountered by corporations during the integration process, and suggests measures to surmount these obstacles. Moreover, potential benefits realized through this integration are explored. The algorithm proffered in this study permits a phased integration approach. Firms have the flexibility to adopt the integration in specific production segments or processes initially and progressively expand, aligning with their capabilities, resources, and the level of process maturity. Such an integration strategy allows companies to leverage Industry 4.0 in overcoming restrictions traditionally associated with the lean approach.