cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarcRohde
Advocate II
Advocate II

Creating A Link to a specific form response

I'm trying to figure out if there is a way to format a linke to a reponse in MS Forms.  I would like to add a 'click here' type of link to an e-mail flow each time a response is submitted.  I don't really need to emebed the detail variables into the message since the users who need the data will all have access to the form responses.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Brad_Groux
Community Champion
Community Champion

The best way to have full granular access to all Form responses is to create a SharePoint List when a new response is received, and call the corresponding List Column for that item into the Email step(s). You could quickly start with the Record form responses in SharePoint template, and then include a link to the List item in the Send Email action.

For a more streamlined approach, you could also use the Send an email to responder when response submitted in Microsoft Forms template. I personally like having an easy to access, read, and use answer repository, which is why I record all of my Form responses to a SharePoist List. As an example, if in the future you want to expand your Flow based upon answers provided in the form to route the answers to only those it is specific to, you could add use conditions with logical expressions and parallel branches. 

Further reading if you do choose to expand:

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!

 

View solution in original post

goncaloperes
Resolver I
Resolver I

The URL to access a given response is something like this
https://forms.office.com/pages/designpagev2.aspx?lang=en-US&&subpage=design&id=FORMID&analysis=true&tab=0&topview=SurveyResults&ridx=RESPONSEID
 
When one accesses a form, one should be able to get the ID from the URL. In the following image, one will see how to get it from the response collection screen, but the ID appears in more views.
 
goncaloperes_0-1688049792994.png
 
Use that ID to update the link above in the FORMID.
 
On another hand, considering that anytime one deletes all the answers that were submitted in a given form, the ID of the response in the form will not restart, but the ridx in the URL always starts from 0, for most cases it is convenient to have a variable named responseID.
 
Given that, I would recommend the following flow:
 
1. When a new response is submitted
2. Get response details
3. Initialize variable: responseURL (String)
4. Initialize variable 2: responseID (Integer)
5. Set variable
6. Set variable 2
7. Send an email (V2)
goncaloperes_1-1688050215781.png

 

If one has deleted various answers and the ID of the Response in the form is 7, considering that the ridx in the URL starts at 0, add the following expression

sub(int(triggerOutputs()?['body/resourceData/responseId']), 7)
If one didn't delete any answer, considering that the ridx starts at 0 and the ID of the first Response is 1, then one can use the following
sub(int(triggerOutputs()?['body/resourceData/responseId']), 1)
 
And then in the Set variable 2, use the following expression
concat('https://forms.office.com/pages/designpagev2.aspx?lang=en-US&&subpage=design&id=FORMID&analysis=true&tab=0&topview=SurveyResults&ridx=', variables('responseID'))
 
 In the email body, then one can do something like this:
goncaloperes_2-1688050847164.png

 

View solution in original post

20 REPLIES 20
Brad_Groux
Community Champion
Community Champion

The best way to have full granular access to all Form responses is to create a SharePoint List when a new response is received, and call the corresponding List Column for that item into the Email step(s). You could quickly start with the Record form responses in SharePoint template, and then include a link to the List item in the Send Email action.

For a more streamlined approach, you could also use the Send an email to responder when response submitted in Microsoft Forms template. I personally like having an easy to access, read, and use answer repository, which is why I record all of my Form responses to a SharePoist List. As an example, if in the future you want to expand your Flow based upon answers provided in the form to route the answers to only those it is specific to, you could add use conditions with logical expressions and parallel branches. 

Further reading if you do choose to expand:

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!

 

RobElliott
Super User
Super User

Hi @MarcRohde , there's no way to add a link to the response itself although you can add all the questions and answers in the response into your email. If you saved the response to a SharePoint list then you could add a Link to item which would open the list item in SharePoint. But you can't link to the actual response.

Rob
Los Gallardos


@RobElliott wrote:

Hi @MarcRohde , there's no way to add a link to the response itself although you can add all the questions and answers in the response into your email. If you saved the response to a SharePoint list then you could add a Link to item which would open the list item in SharePoint. But you can't link to the actual response.

Rob
Los Gallardos


The Forms connector has rather limited functionality, mainly because Forms itself does. In a Form's responses, you can only see the basic metrics that are captured as a whole. Currently there is not a unique API-based record that you can call and access from the Forms website. 

Currently you can view an individual response from the website, but it is several clicks in, and it actually displays as a custom view of the Form's design page (see red box):FormsResponsePage.png

If you would like a Microsoft Forms API, which would almost certainly expand the Connector's abilities, you can vote on the API for Microsoft Forms request on the Forms User Voice. If you'd like to expand the functionality of the Forms connector for Flow, please consider submitting it to the Flow Ideas page, where it can be voted on by other users, and tracked and commented on by the Flow team.

One reason that Microsoft likely won't develop an API for Forms, is that it is meant for Office 365 customers - who have access to SharePoint. So, developing an API for Forms would be re-inventing the wheel as it would be nearly identical in scope to the API for SharePoint Lists. Those same responses can also be sent to any data source (SQL, Cosmos DB, Excel, Google Sheets, etc) - so think of Forms as a data gathering tool, not a data storage or access tool.

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!

Thanks,

 

I was looking deeper at the link that gets sent to the respondant and the format is pretty simple and could be recreated but what looks like is missing from the service call in the flow is the ResponseGetToken

 

https://forms.office.com/Pages/ResponseDetailPage.aspx?id={form id}&rid=5&GetResponseToken={request token}

 

I know the form id, the request ID is in the dynamic date but the get token kills it.

Clifferton
Helper II
Helper II

I think I found a way to do this.

 

the link that displays to a form owner when they manually access the responses looks like this.

https://forms.office.com/pages/designpagev2.aspx?lang=en-US&origin=OfficeDotCom&route=Start&sessionid={SESSIONID}&subpage=design&id={FORMID}&analysis=true&tab=0&topview=SurveyResults&qid={QIDWHATEVERTHATIS}&ridx={ID-1}

 

You can carefully trim that URL to something like this.

https://forms.office.com/pages/designpagev2.aspx?lang=en-US&&subpage=design&id={FORMID}&analysis=true&tab=0&topview=SurveyResults&ridx={ID-1} 

 

Then you only need to

  1. replace {FORMID} with the form Id (without curly braces) and,
  2. replace {ID-1} with the ID number in the responses excel sheet minus 1. So to see responses for ID 3, enter 2 in the url.

 

Flow would look something like:

When response submitted

Get response details

Get data from excel

create string variable

compose (to create url and store in the string variable)

Send email with composed link.

smurray
Regular Visitor

Thank you Clifferton!

 

Your response worked perfectly for us. I used the 'Initialize Variable' step at the top of the flow, then I put the flow ID there and use that variable to fill it in for all later steps (makes it easier since we are copying this flow to use for other forms). I then used the 'Initialized Variable' step again and have it fill the response ID from the trigger. After that, I use the 'Decrement Variable' step to lower it by one. I then used both variables in the link you provided above and it works perfectly.

Awesome! I'm glad it worked for y'all! 

Hello, I'm trying to accomplish this but I don't see a "get data from excel" option in the flows. Could you help me figure this out? I have very basic knowledge of Power Automate. If possible could you post an example of this flow?

Cliffferton
Advocate I
Advocate I

This page has a bunch of good information on how the Excel connector works.

I haven't built a flow like this one and it kind of depends on exactly what you're trying to do.

You could List rows present in a table if you want all the data from the whole table.

Or if you know what row you want, you could use Get a row.

 

In either case, the number in the ID column is what you'll need to modify to display the correct response.

 

Clifferton's solution worked for me.

Just note I had to subtract 1213 instead of 1. It seems to be related to the row number the item is at in the Excel file with all the responses you get in the "Open in Excel" button from the form's main page.

For some reason in my case we only had some 500 items but the ids started in the 1200s, so for instance the item with Response ID 1640 was in the row 429 and the "ridx" i had to put in the link was 427. I guess it was accounting for a couple header files or something.

Cliffferton
Advocate I
Advocate I

The ID column is sequential no matter what data exists in the excel sheet. If prior responses were deleted from the excel sheet, new responses would continue to come in with higher ID numbers.

goncaloperes
Resolver I
Resolver I

The URL to access a given response is something like this
https://forms.office.com/pages/designpagev2.aspx?lang=en-US&&subpage=design&id=FORMID&analysis=true&tab=0&topview=SurveyResults&ridx=RESPONSEID
 
When one accesses a form, one should be able to get the ID from the URL. In the following image, one will see how to get it from the response collection screen, but the ID appears in more views.
 
goncaloperes_0-1688049792994.png
 
Use that ID to update the link above in the FORMID.
 
On another hand, considering that anytime one deletes all the answers that were submitted in a given form, the ID of the response in the form will not restart, but the ridx in the URL always starts from 0, for most cases it is convenient to have a variable named responseID.
 
Given that, I would recommend the following flow:
 
1. When a new response is submitted
2. Get response details
3. Initialize variable: responseURL (String)
4. Initialize variable 2: responseID (Integer)
5. Set variable
6. Set variable 2
7. Send an email (V2)
goncaloperes_1-1688050215781.png

 

If one has deleted various answers and the ID of the Response in the form is 7, considering that the ridx in the URL starts at 0, add the following expression

sub(int(triggerOutputs()?['body/resourceData/responseId']), 7)
If one didn't delete any answer, considering that the ridx starts at 0 and the ID of the first Response is 1, then one can use the following
sub(int(triggerOutputs()?['body/resourceData/responseId']), 1)
 
And then in the Set variable 2, use the following expression
concat('https://forms.office.com/pages/designpagev2.aspx?lang=en-US&&subpage=design&id=FORMID&analysis=true&tab=0&topview=SurveyResults&ridx=', variables('responseID'))
 
 In the email body, then one can do something like this:
goncaloperes_2-1688050847164.png

 

Hi Clifferton - I'm a bit of a power automate newbie, but I'm figuring it out pretty well. Would you be able to supply images of exactly what to insert into the fields for these two steps: 

create string variable

compose (to create url and store in the string variable)

 

Thanks!

Hi goncaloperes,

 

I tried your method and everything worked except when the email is received, the link gets an error that the form doesn't exist. I have attached a view of the process as it is now. Can you help?

KES2,

Sorry for the late reply. Here is a page on using variables in Power Automate. You need to "initialize a variable" first. In that step, you'll name the variable and choose the type of variable (string).

The compose step is a bit more difficult to explain, but if you look at @goncaloperes's post right above yours, you'll see a clearer explanation.

 

In the future, if you have a question that does not fit the topic of a discussion, such as how to use variables, you should probably start a new thread.

 

~C

Angelwing,

Your images don't show where or how you modified the URL to create the link to the form responses. If you include more detail there, we might be able to help.

I'm not very experienced with initializing and setting variables. Are you able to open those steps to show the code inside?

 

The way I'm doing it must be wrong since the URL that results defaults to the first response vs. most recent. The ridx number increases by one each time, but how to do I code it to go to the most recent ridx?

I have tried this multiple times and keep getting the error- "enter a valid integer".  Can you clarify for me what goes in each of these boxes?   I assumed this went into "initializing variable 2", but I keep receiving the "enter a valid integer" error

3. Initialize variable: responseURL (String)
4. Initialize variable 2: responseID (Integer)
5. Set variable
6. Set variable 2

  

@kinnett You can do the whole thing with the compose action too, rather than using variables. I used variables because they were easier to use in my multi-level flow. Using compose simplifies the whole thing quite a bit. You could even do it in one compose action, but I think it's easier to break up math actions from string actions.
Here's a simple example.

Clifferton_0-1710545255882.png

 

Inside the subtraction compose action, have the following expression which adds negative 1 to the response ID. @Amira703 If you just grab the response ID from the dynamic content you get from the Get Response Details action, it will be the one that was most recently submitted.

 

add(-1,triggerOutputs()?['body/resourceData/responseId'])

 

 

Inside the Compose URL action, I have this input. This prevents you from having to muck around with concatenate expressions. The dynamic content here is just the output from the subtraction compose action.

Clifferton_1-1710545447645.png

 

Then in the email, I find it easier to create the link within the HTML code instead of trying to get dynamic content into the WYSIWYG editor. The dynamic content here is the output from the URL compose action.

Clifferton_2-1710545616765.png

 

Then the URL is actually a link in the email so folks can just click it instead of having to copy and paste.

Screenshot 2024-03-15 173545.png

Helpful resources

Announcements

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!

Tuesday Tip: Getting Started with Private Messages & Macros

Welcome to TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   This Week's Tip: Private Messaging & Macros in Power Apps Community   Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member!   Our Knowledge Base article about private messaging and macros is the best place to find out more. Check it out today and discover some key tips and tricks when it comes to messages and macros:   Private Messaging: Learn how to enable private messages in your community profile and ensure you’re connected with other community membersMacros Explained: Discover the convenience of macros—prewritten text snippets that save time when posting in forums or sending private messagesCreating Macros: Follow simple steps to create your own macros for efficient communication within the Power Apps CommunityUsage Guide: Understand how to apply macros in posts and private messages, enhancing your interaction with the Community For detailed instructions and more information, visit the full page in your community today:Power Apps: Enabling Private Messaging & How to Use Macros (Power Apps)Power Automate: Enabling Private Messaging & How to Use Macros (Power Automate)  Copilot Studio: Enabling Private Messaging &How to Use Macros (Copilot Studio) Power Pages: Enabling Private Messaging & How to Use Macros (Power Pages)

Users online (8,252)