Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Automatic Document Numbering

Hi all,


I have developed a Flow that automatically triggers when a response from a Form is recieved, the response details are collected and used to populate a Microsoft Word template, a file is then created in a SharePoint folder with the template filled with responses.


I would like that each time this new file is created when a new response to the Form is submitted, that the document name will look as follows "Name[Number].docx", and each time a response is submitted the number increases by one, as this Form is being transferred over from a paper copy the Number will not start at 1 for the first response, so this will also need to be accomodated.


In addition to the document name containing the number there is also a field within the template that also contains what version number the document is, is there anyway this field can be filled with the same number that is in the document name?

Dual Super User
Dual Super User

Re: Automatic Document Numbering

Hi @AlexanderWilson 


Yes, That can be done. When a response is recorded, an ID is generated for that response and this is a unique integer number that can be retrieved from the dynamic selector as shown below: 




Hope this Helps!


If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Level: Powered On

Re: Automatic Document Numbering

Thanks for the reply @yashag2255  , Although this is a suitable solutions for different scenarios, it doesn't quite match up with what I'm looking for.


As mentioned in the original post the process is being moved from an already existing paper process, where the response number is already in the 200+ range, this is where I would like the Form reponse number to carry on from our existing number count, rather than the documents being titled with the Response ID, which starts at 1 and counts up.


If possible I would prefer to rename the file in a different flow after the file was created, as often responses are completed as a duplicate, and I was trying to also integrate a file check to check for any duplicates (as one of the mandatory responses would identify as a duplicate), and the method you described would provide issues if a duplicate response was created.

Helpful resources


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,921)