web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow - Autogenerating ...
Power Automate
Unanswered

Flow - Autogenerating two unique numbers

(0) ShareShare
ReportReport
Posted on by 2

Hello,

 

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,

Categories:
  • Mark_Stokes Profile Picture
    12 on at
  • MarkStokes Profile Picture
    561 on at
    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.

    https://medium.com/@mark_stokes/generating-pseudo-random-passwords-in-microsoft-flow-d7a9c232abe5

    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.
    https://medium.com/@mark_stokes/creating-and-sending-a-mailchimp-campaign-with-custom-html-from-shar...

    Hope this helps.

    -Mark
  • DougL1 Profile Picture
    2 on at

    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,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard