Here is a little event I just made for China
event = {
id = 199990
random = yes
country = CHI
name = "EVT199990N"
desc = "EVT199990D"
style = 0
date = { day = 1 month = january year = 1836 }
offset = 1
deathdate = { day = 30 month = december year = 1910 }
action_a = {
name = "ACT137000A"
command = { type = convert_pop_type which = Nanfaren value = slaves when = 100 }
command = { type = set_slavery value = yes }
}
}
If you force it to fire. It should fire anyway, but I didnt really spend much time making the firing part of it, so it probably needs fixing. Though you will probably not want it to keep on firing, so perhaps random to no and no trigger will mean only you can fire it in command console.
It will convert all Nanfaren nationality into slaves. Sadly there is no way to do it for all minonrities, You can use cultural_minority tag, but that seems to convert all except your main accepted culture, ie the first one on the accepted list, into slaves. Fine if you only have one accepted culture but if not you can lose a lot of pops. Therefore you have to pick nationalities (or religion etc). You could use the cultural_minority tag and then convert those who are accepted back again with a nationality command, but you would lose all types except the one you change back into.
You have to have slavery value set to yes, otherwise they will all convert straight back again.