If you want to through the GX interface use the generator function for it.
Otherwise you will need to use NODE red.