  Context. New estimates of the masses and radii of the seven planets orbiting
the ultracool M-dwarf TRAPPIST-1 star permit improved modelling of their
compositions, heating by tidal dissipation, and removal of tidal heat by
solid-state convection. Aims. Here, we compute the heat flux due to insolation
and tidal heating for the inner four planets. Methods. We apply a Maxwell
viscoelastic rheology to compute the tidal response of the planets using the
volume-weighted average of the viscosities and rigidities of the metal, rock,
high-pressure ice and liquid water/ice I layers. Results. We show that
TRAPPIST-1d and e can avoid entering a runaway greenhouse state. Planet e is
the most likely to support a habitable environment, with Earth-like surface
temperatures and possibly liquid water oceans. Planet d also avoids a runaway
greenhouse, if its surface reflectance is at least as high as that of the
Earth. Planets b and c, closer to the star, have heat fluxes high enough to
trigger a runaway greenhouse and support volcanism on the surfaces of their
rock layers, rendering them too warm for life. Planets f, g, and h are too far
from the star to experience significant tidal heating, and likely have solid
ice surfaces with possible subsurface liquid water oceans.
