Context. The TRAPPIST-1 planetary system is favourable for transmission spectroscopy and offers the unique opportunity to study rocky planets with possibly non-primary envelopes. We present here the transmission spectrum of the seventh planet of the TRAPPIST-1 system, TRAPPIST-1 h (R P =0.752 R ⊕ , T eq =173K) using Hubble Space Telescope (HST), Wide Field Camera 3 Grism 141 (WFC3/G141) data. Aims. Our purpose is to reduce the HST observations of the seventh planet of the TRAPPIST-1 system and, by testing a simple atmospheric hypothesis, to put a new constraint on the composition and the nature of the planet. Methods. First we extracted and corrected the raw data to obtain a transmission spectrum in the near-infrared (NIR) band (1.1-1.7µm). TRAPPIST-1 is a cold M-dwarf and its activity could affect the transmission spectrum. We corrected for stellar modulations using three different stellar contamination models; while some fit the data better, they are statistically not significant and the conclusion remains unchanged concerning the presence or lack thereof of an atmosphere. Finally, using a Bayesian atmospheric retrieval code, we put new constraints on the atmosphere composition of TRAPPIST-1h. Results. According to the retrieval analysis, there is no evidence of molecular absorption in the NIR spectrum. This suggests the presence of a high cloud deck or a layer of photochemical hazes in either a primary atmosphere or a secondary atmosphere dominated by heavy species such as nitrogen. This result could even be the consequence of the lack of an atmosphere as the spectrum is better fitted using a flat line. Variations in the transit depth around 1.3µm are likely due to remaining scattering noise and the results do not improve while changing the spectral resolution. TRAPPIST-1 h has probably lost its atmosphere or possesses a layer of clouds and hazes blocking the NIR signal. We cannot yet distinguish between a primary cloudy or a secondary clear envelope using HST/WFC3 data; however, in most cases with more than 3σ confidence, we can reject the hypothesis of a clear atmosphere dominated by hydrogen and helium. By testing the forced secondary atmospheric scenario, we find that a CO-rich atmosphere (i.e. with a volume mixing ratio of 0.2) is one of the best fits to the spectrum with a Bayes factor of 1.01, corresponding to a 2.1σ detection.