If dark energy introduces an acceleration in the universal expansion then large-scale gravitational potential wells should be shrinking, causing a blueshift in the cosmic microwave background (CMB) photons that cross such structures [integrated Sachs–Wolfe (ISW) effect]. Galaxy clusters are known to probe those potential wells. In these objects, CMB photons also experience inverse Compton scattering off the hot electrons of the intracluster medium and this results in a distortion with a characteristic spectral signature of the CMB spectrum [the so-called thermal Sunyaev–Zel’dovich (tSZ) effect]. Since both the ISW and the tSZ effects take place in the same potential wells, they must be spatially correlated. We present how this cross-ISW–tSZ signal can be detected in a CMB data contained way by using the frequency dependence of the tSZ effect in multifrequency CMB experiments like Planck, without requiring the use of external large-scale structure tracers data. We find that by masking low-redshift clusters, the shot noise level decreases significantly, boosting the signal-to-noise ratio of the ISW–tSZ cross-correlation. Nevertheless, in a more realistic case in which we only mask the clusters that could be detected by Planck, detection of the ISW–tSZ cross-signal is expected to reach only low significance (1.5σ) unless external cluster catalogues are used to mask the tSZ signal coming from lower mass clusters at low z that do not significantly contribute to the signal but to the shot noise. We also find that galactic and extragalactic dust residuals must be kept at or below the level of ∼0.04 (μK)2 at ℓ= 10, a limit that is a factor of a few below Planck’s expectations for foreground subtraction. If this is achieved, CMB observations of the ISW–tSZ cross-correlation should also provide an independent probe for the existence of dark energy and the amplitude of density perturbations.