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

Flow - Autogenerating two unique numbers



We already have a flow setup that will create a new job and copy the files needed to the sharepoint site.. This is working great... However, we would like to auto generate two numbers and place in a PDF file/template..


Question: I was wondering if someone is willing to help us. This process will need (2) unique numbers: one is a job# and the other is a permit#.. Can we setup a Flow that will auto generate both numbers? and store the numbers into a PDF template that we have created? this PDF file is stored on a sharepoint site.


Any help would be greatly appreciated.


Thank You,

Regular Visitor

Skilled Sharer
Skilled Sharer

Hi DougL1

You could use a variation of my Random Password Generator approach to generate the numbers you require. I’d recommend a format that uses 4 or 5 characters to increase the chances that it’s unique.

To “ensure” it’s unique, I would store the generated values in a list somewhere. Maybe a Excel Spreadsheet or as metadata against the PDF that you generate if you store it in SharePoint. If you do this then you can put your random number generator in a loop that generates a password, gets items from SharePoint that match and if no items are returned then you know it’s unique. Otherwise you just go creating new ones until you find one to be unique.

I haven’t done any PDF generation from Flow so can’t conment on the connectors. Typically you’d generate the document body (probably in a html markup) and send it to some PDF Maker service. This is a bit like my MailChimp example.

Hope this helps.

New Member

Hi Mark,


Thanks for the info... Can you please repost the 2nd link? regarding the PDF file? as I am unable to get the link to work.


Thank You,

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.

Users online (1,169)