A building block of an integrated thermoelectric generator with out-of-plane heat flow configuration, comprising a base silicon wafer and a cover silicon wafer each having two opposite faces, wherein: - said base silicon wafer has, on one face of said opposite faces, a plurality of hills and a plurality of valleys between said hills ; - each of said hills comprises a first truncated pyramid or cone in the silicon wafer, on which a second truncated pyramid or cone is connected, which is made of electrically and thermally insulating material, wherein the larger base of the second truncated pyramid or cone is smaller than and in contact with the smaller base of the first truncated pyramid or cone in the silicon wafer; - on the smaller base and at least partially on the side surface of said second truncated pyramid or cone is present a layer of p-doped type thermoelectric material which extends also over at least a portion of the smaller base of said first truncated pyramid or cone, - a top electrical contact is present on the smaller base of said second truncated pyramid or cone and two or more side contacts which at one end are in contact with said layer of thermoelectric material on said at least one portion of the smaller base of said first truncated pyramid or cone and extend on the side of said hill up to a portion of a respective valley ; - said cover silicon wafer has on one face of said opposite faces a plurality of valleys and hills , - on substantially the whole of said one face of the cover silicon wafer there is a layer of electrically insulating material; - on top of the hills of said cover silicon wafer metallic contacts are placed which serve both as electrical contacts and as top thermal contacts; - said cover silicon wafer is facing said base silicon wafer in such a way that the respective top contacts are in contact and the space between said cover silicon wafer and said base silicon wafer is a space in which vacuum is made or a gas is present, in particular air. - said base silicon wafer has, on one face of said opposite faces, a plurality of hills and a plurality of valleys between said hills ; - each of said hills comprises a first truncated pyramid or cone in the silicon wafer, on which a second truncated pyramid or cone is connected, which is made of electrically and thermally insulating material, wherein the larger base of the second truncated pyramid or cone is smaller than and in contact with the smaller base of the first truncated pyramid or cone in the silicon wafer; - on the smaller base and at least partially on the side surface of said second truncated pyramid or cone is present a layer of p-doped type thermoelectric material which extends also over at least a portion of the smaller base of said first truncated pyramid or cone, - a top electrical contact is present on the smaller base of said second truncated pyramid or cone and two or more side contacts which at one end are in contact with said layer of thermoelectric material on said at least one portion of the smaller base of said first truncated pyramid or cone and extend on the side of said hill up to a portion of a respective valley ; - said cover silicon wafer has on one face of said opposite faces a plurality of valleys and hills , - on substantially the whole of said one face of the cover silicon wafer there is a layer of electrically insulating material; - on top of the hills of said cover silicon wafer metallic contacts are placed which serve both as electrical contacts and as top thermal contacts; - said cover silicon wafer is facing said base silicon wafer in such a way that the respective top contacts are in contact and the space between said cover silicon wafer and said base silicon wafer is a space in which vacuum is made or a gas is present, in particular air. <EOS>