[{"id":"b07cd5d8a9884a8e","type":"function","z":"279d0ea8.c23d82","name":"FilterTrueTags","func":"function filterTrueTags(tags) {\n return Object.keys(tags).filter(key => tags[key] === true);\n}\n\nconst tags = msg.payload\n\nmsg.payload = filterTrueTags(tags)\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":560,"wires":[["3b62b96a624b4f6c"]]},{"id":"b3df672959fdad08","type":"inject","z":"279d0ea8.c23d82","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"Tag1\":true,\"Tag2\":false,\"Tag3\":false,\"Tag4\":true,\"Tag5\":false,\"NewTag0\":false,\"OldTag1\":true}","payloadType":"json","x":290,"y":560,"wires":[["b07cd5d8a9884a8e"]]},{"id":"3b62b96a624b4f6c","type":"debug","z":"279d0ea8.c23d82","name":"debug 285","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":650,"y":560,"wires":[]}]
This way you will filter out variables which are true,
Then you can do whatever you want to do - iterate over it and create the string you want and forward it to email