Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

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 III
Dual Super User III

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!

Frequent Visitor

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


Super User Program Update

Three Super User rank tiers have been launched!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (2,401)