This study had the purpose to further the use of industrial lasers in the manufacturing of hairpin electric motors by optimizing the process of contacting the hairpins. A problem with laser beam welding of copper is the porosity created in the process which can lead to increased resistance of the welded region along with degraded mechanical properties. By experiment this study aimed to find the optimal parameters to reduce the porosity while maintaining all other requirements for the weld. The track of achieving a satisfactory simulation was done to minimize the need of physical experiments which can be argued as a sustainable development aspect. A set of parameters was found that achieved a low volume of pores, a sufficient weld depth and a desirable bead geometry. Some pores still remained, mostly at the endpoint of the laser path which could be caused by the laser shut-off leading to a keyhole collapse enclosing some pores in that region. The simulation showed promising results in welding depth and melt region. Further work on ramping the laser power at the endpoint could be beneficial for eliminating the remaining porosity as well as refining the simulation in terms of porosity.