Showing results for 
Search instead for 
Did you mean: 
New Member

Auto increment sharepoint counter



I'm looking for a way to increment a counter to get a unique ID each time I receive an email. I tried to create a Sharepoint list to increment a value with the following actions :


GetItems -> initialize variable -> increment variable -> update item


I don't get the desired result. Is there a way to achieve this?



Community Support
Community Support



Each flow run is independent of each other. Initializing a variable will just initialize it at that same value each run. There are a few ways we could try and get around this but it would depend a lot on how you have your SharePoint set up. If you want a specific unique ID you will need to pull a number in from somewhere and increment it. Otherwise you could always generate a random number, depending on how many runs you have it is very unlikely that you will generate a duplicate number.








Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User
Super User


Please post a screen shot of your Flow in edit mode.  Also, what happens when it runs?  You say that you don't get the desired results...



If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.




is there a solution to the initial request? if someone has the solution can you post the screenshot cause I would like to achieve the same thing.


thank you

@Paul-LS and @kouliscon 

An easy way to accomplish this is as follows:

  • Create a SharePoint list and add a number column
  • Add one row of data to the list - enter your starting number in the number column
  • When you need a number from the list, use a Get items action
    • Only one row will be returned
    • Use the value from the number column
    • Add one to the number returned and update the SharePoint list item

See my example below.  You can refer to the variable when you need to use the counter number.






If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


thank you very much @ScottShearer for the detailed description!

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,887)