904 or 727 in 66 barracuda

I have a 66 barracuda that I am installing a slightly built 340 in. It is a 4 speed car but my left knee is now shot. I am going to swap it to an automatic so I can drive it and not have to sell it in a year or so. it is not a # matching car in any way shape or form. I will keep all 4 speed parts with car so it can be turned back if desired down the road. I am unsure if a 727 will fit in a 66 a body or not? I am not an auto guy until now and don't want to buy a trans that wont fit. What is the difference between a 904 and 727? thx for any help in this and all info is appreciated.