Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Triggers
  • Resources
  • ABOUT ME
  • Get help with your flow
Menu

How to create a unique identifier in your Power Automate flow

Posted on June 22, 2022June 22, 2022 by Tom

“How do I ensure that the ids are unique? Can I create a reliably unique identifier in Power Automate that’ll never repeat?”


There’re some situations when you’ll need a unique identifier. If you’re working with SharePoint lists you can just use the item id, but what if there’s no id by default? If you need to connect multiple MS Forms, or create multiple Planner checklist items? In these situations it’s up to you to create some form of an id, and this post will show you two approaches.

Get a random number

The first solution is to create a random number. This approach is less reliable, but it’s easier for the users as it’s a single number. You can use the Power Automate expression rand(…) with two parameters to get it.

rand(<from number (included)>, <to number (not included)>)

The outcome will be a random number between the two numbers, e.g.

rand(0,3) => 0 or 1 or 2

If you enter the second number big enough, e.g. 1000000, you can still get quite a unique number.

Power Automate create unique identifier

Get a guid

The other option, more reliable, but also much harder for users to work with, is a guid. This time it’s not a number, it’s a combination of 32 characters and number with 4 hyphens, e.g.

ed4ba2cf-c5c7-40bd-ac6d-6b0a4430b00d

Power Automate has an expression guid() with no parameters that’ll create such guid for you.

Power Automate create unique identifier

Summary

You’ve got two options how to create a unique identifier within Power Automate flow. The first one is to create a random number, which is better if it’s some identifier that the users have to work with. It’s a bit less reliable, but it’s easier to read and remember.

The second one is a proper guid. An identifier that’ll be unique in the whole universe, but as a downside you can’t ask users to remember or use it. That’s why I use guid only when it’s hidden somewhere on the background, not visible to the eyes of the users.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Do you know what to do, but not how to do it?

Get The Ultimate Power Automate expressions cheat sheet and translate your thoughts into flows with ease!


There's also the HTTP requests to SharePoint cheat sheet to help you overcome limitations of some standard actions!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with 1000s of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2023 Let's POWER Automate | Theme by SuperbThemes