If "unique" is more important than "actually random", I've used the datetime of the zap firing as a reference. If you write {{zap_meta_timestamp}} into the field it will include the time at which the zap fired in unix time, which is a number like this: 1567154862 (the time I'm writing this). Unless your zap was to fire twice in the same second, this will be unique-to-you.
Zapier team, you could add "generate a UUID" to the Formatter's skills, perhaps?
@SimonJP wow, that's a great and super simple approach - thanks for sharing! We do have an open feature request for this already (in the form of a random number generator) so I can add you to that and update this thread should it get implemented. Not sure how well an exact UUID would work if the Zap gets turned off and loses and UUIDs it's already given/stored, so perhaps the random number generator would suffice. Thanks again for offering up a new workaround to this!
@SimonJP @jesse if you need a UUID, you can copy and paste this into Code by Zapier - Run JavaScript:
//from https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
function uuidv4() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
return [{uuid: uuidv4()}];
@jesse yes, the random number generator will more than suffice (also from Stack Overflow):
"the annual risk of a given person being hit by a meteorite is estimated to be one chance in 17 billion, which means the probability is about 0.00000000006 (6 × 10−11), equivalent to the odds of creating a few tens of trillions of UUIDs in a year and having one duplicate."
(... that said, per the author of the function above "Be aware that UUID uniqueness relies heavily on the underlying random number generator (RNG). The solution above uses Math.random() for brevity, however Math.random() is not guaranteed to be a high-quality RNG." So it may not be quite that good but probably good enough!)
Fantastic stuff @john_fohrman
Hi friends, I wanted to swing by and share some good news! 🚨
If you’d rather not fuss with the code step, a new feature in Formatter now generates a random number for you! 🎉


Thanks for sharing your ideas here in community and happy zapping! ⚡️