From Feynman diagrams to commutative diagrams