I think you can do this using just conservation of mass and conservation of energy. The conservation of mass says:
[tex]\dot{m}=\rho_i A v_i = \rho_o A v_o[/tex]
where [tex]\dot{m}[/tex] is the mass flow rate, A is cross sectional area of the pipe, [tex]\rho_i[/tex] and [tex]\rho_o[/tex] are the input and output mass densities of the gas, and [tex]v_i[/tex] and [tex]v_o[/tex] are the input and output velocities.
If we assume an ideal gas where the internal energy is [tex]U=C_v N k T[/tex] where U is internal energy, N is the number of particles, k is Boltzmann's constant, and T is temperature, [tex]C_v[/tex] is the specific heat, then the conservation of energy says:
[tex]\frac{1}{2}\dot{m}v_i^2+C_v \dot{N}_i kT_i + \dot{Q} = \frac{1}{2}\dot{m}v_o^2+C_v\dot{N}_o kT_i[/tex]
where [tex]\dot{Q}[/tex] is the rate of heat input, but [tex]N\mu=m[/tex] where [tex]\mu[/tex] is the average mass per molecule, so substitute [tex]\dot{m}/\mu[/tex] for the [tex]\dot{N}[/tex] and solve for [tex]\dot{Q}[/tex] and we get:
[tex]\dot{Q}=\frac{\dot{m}}{2}(v_0^2-v_i^2)+\frac{C_v k \dot{m}}{\mu}(T_o-T_i)[/tex]
So you really need to know the input and output velocities as well as the temperatures. I am not sure, but since you said "gently flowing", you might be able to assume that the term involving the velocities is negligible, then you only need temperatures. If you cannot neglect velocities, then it gets more complicated, and you have to know the length of the pipe in order to solve the problem. Also, that probably means you have to account for viscous effects, and bring Poiseuilles law into the mix.
Edit: Thinking about this, if you ignore the velocity term, you just have the case for incompressible flow. In other words, you either need to measure the input and output velocities, assume incompressible flow, or we need a better analysis. The conservation of mass and energy equations are correct, I think, but we are missing the conservation of momentum, so "better analysis" means we need to include the conservation of momentum. This situation might qualify for incompressible flow, I will check that out.