Ionic thermoelectrics show great potential in low-grade heat harvesting and thermal sensing owing to their ultrahigh thermopower, low cost and ease in production. However, the lack of effective n-type ionic thermoelectric materials seriously hinders their applications. Here, we report giant and bidirectionally tunable thermopowers within an ultrawide range from -23 to +32 mV K-1 at 90% RH in solid ionic-liquid-based ionogels, rendering it among the best n- and p-type ionic thermoelectric materials. A novel thermopower regulation strategy through ion doping to selectively induce ion aggregates via strong ion-ion interactions is proposed. These charged aggregates are found decisive in modulating the sign and enlarging the magnitude of the thermopower in the ionogels. A prototype wearable device integrated with 12 p-n pairs is demonstrated with a total thermopower of 0.358 V K-1 in general indoor conditions, showing promise for ultrasensitive body heat detection.