Automatic welding machine for longitudinal finning of pipes, containing clamping units placed symmetrically around the circumference with pushing pneumatic cylinders, a compression drive and pressing and supplying welding current contact welding rollers, a die positioning the ribs with respect to the pipe and clamping units, with windows for the passage of rollers and a mechanism for positioning the die, characterized in that each clamping unit has a mechanism for adjusting the position of the longitudinal axis of the compression drive of the contact welding roller, consisting of a compression drive guide, two eccentric regulators, a compression drive housing, a ball joint assembly, an adjusting lock nut, a fixing screw and two bronze crackers, and a mechanism for regulating the contact welding roller, consisting of a contact welding roller, a right and left bushing, a right and left nut, a right and left cheek, fixing screws and a bolt, wherein the die contains a mechanism for positioning the rear part of the die with respect to the axis of the contact welding roller, containing a body of the die, a die body centralizer, a radial stand, an axial stand, a turnbuckle, a turnbuckle centralizer, a contact welding roller, a plate.