Catalyzes the transfer of the formyl group from N-formylglutamate to tetrahydrofolate (THF) to yield 5-formyltetrahydrofolate (5-CHO-THF) and glutamate (Glu). The triglutamate form of 5-CHO-THF (5-CHO-THF-Glu3) can also be used as substrate. It can also catalyzes the transfer of the formimino group from N-formiminoglutamate to tetrahydrofolate (THF) to yield 5-formiminotetrahydrofolate (5-NH=CH-THF) and glutamate (Glu). It can replace YgfA to catalyzes the irreversible ATP-dependent transformation of 5-CHO-THF to form 5,10-methenyltetrahydrofolate (5,10-CH=THF). (6S)-5-formyl-5,6,7,8-tetrahydrofolate + L-glutamate = (6S)-5,6,7,8-tetrahydrofolate + H(+) + N-formyl-L-glutamate 5-formimidoyltetrahydrofolate + L-glutamate = (6S)-5,6,7,8-tetrahydrofolate + N-formimidoyl-L-glutamate (6S)-5-formyl-5,6,7,8-tetrahydrofolate + ATP = 5,10-methenyltetrahydrofolate + ADP + phosphate kcat is 0.27 sec(-1) for formyltransferase with 5-CHO-THF or 5-CHO-THF-Glu3 as substrates (at pH 7.3 and 30 degrees Celsius). Amino-acid degradation; L-histidine degradation into L-glutamate; L-glutamate from N-formimidoyl-L-glutamate (transferase route): step 1/1. One-carbon metabolism; tetrahydrofolate interconversion. Belongs to the formiminotransferase family.