How to get a number code after submitting a MS Forms

Copper Contributor

Dear All,

I am designing the online Health Declaration form by using MS Forms.

May I have a question that which way we can customize or add on an MS Forms in order for us to get a random code after submitting an MS Forms? I mean that that random code or number is a piece of evidence to prove we had completed the form as well as provide it to the Security Guard at the Gate.

May we use MS Power Automate Flows for this?

I am looking forward to receiving your experiences on this topic for me.

Many thanks.

Bets regards,


5 Replies

@Thuan Phan Van Minh Yes I would use a flow in Power Automate for this to:


  1. get each form response as it arrives;
  2. save it to a list in SharePoint which will provide an audit trail as well as an ID number
  3. send an email back to the person who submitted the form with the details of what they entered on the form and the ID number from the SharePoint list.

The person can then print out the email or have it on their phone to show to the security guard.


We do exactly this with our IT ticket system and for other forms and it works well.


Los Gallardos
Intranet, SharePoint, Website and Power Platform Manager (and classic 1967 Morris Traveller driver)

Dear Rob,

Many thanks for your sharing about this. It is helpful for me.
May I check that whether we can use SMS or not? Many guests don't have an email address because they are physical workers as well as we will lend them a iPad to declare in this case there will be a number code returned after submitting the form is better.
Or if we don't use MS Forms and Power Automate Flows, do we a free software may perform this function?
Thank you so much.
Bets regards,

@Thuan Phan Van Minh SMS is possible but they are premium Power Automate connectors so there will be a cost. I don't know of any free software that can interact with Forms and Power Automate.


Los Gallardos
Intranet, SharePoint, Website and Power Platform Manager (and classic 1967 Morris Traveller driver)


Thank you so much for your information.


Best regards,


Hi Thuan,

Forms page cannot conclude with a random generated QR code, so you’re likely looking for the submitter to receive the QR code or random number on their mobile phone- right?

Firstly, if feasible, display a QR code for the forms page instead of sharing iPads. Visitors can scan the QR code using their mobile to get to the Forms page and submit. This avoids physical contact. Additionally, keep a tiny url (that redirects to Forms page) printed as well below the QR code, in case the QR scanning doesn’t work.

Secondly, as @RobElliott mentioned, there are premium connectors in Power Automate that can trigger SMS (ex: Twilio connector). Optionally, have Power Automate save the responses to a SharePoint file, and security guards can search the file by “name” when the submitter walks in. If you deploy a front-end Power Apps page, security guards can search the submitter by name in that page.