The automatic grouting tool is a new wellhead tool used in trip out/in and casing operation, it is convenient to timely and conveniently grout and circulate drilling fluid in the process of trip out/in the string. Compared to conventional grouting manifold and manual operating type, its upper end is directly connected to the top drive or the rotary swivel saver sub, the lower end inserts into the string to grout the drilling fluid, it adopts the self-sealing cup packer to seal the string, it can circulate the drilling fluid at the same time of trip out/in operation and realize the rapid lowering of string; through the design of internal drilling fluid flow direction control valve, it can effectively avoid the rig pollution, reduce the operating intensity and improve the operation efficiency and safety.