title: Get a link to an individual Google Forms response from a Google Sheet
body: <p>I have a Google Form which outputs responses to a Google Sheet. Some of my form questions have long paragraph responses, so I'd like to be able to click a link on each row from my tracking sheet and have it open the original response page as seen from the Form's "responses" tab.</p>
  
  <p>The URL I'm trying to generate, which I get by going to <strong>Responses -> Individual</strong> from my Form, looks like:</p>
  
  <pre><code>https://docs.google.com/forms/d/&lt;form_id&gt;/edit#response=&lt;response_id&gt;
  </code></pre>
  
  <p>I have looked at the <a href="https://developers.google.com/apps-script/reference/forms/form-response" rel="noreferrer"><code>FormResponse</code></a> API documentation, but I can't manage to extract the same ID used by the Google Form viewer from a <code>FormResponse</code> object. While I know the appropriate form ID, the response ID that is valid for that URL isn't the same one returned by either <code>FormResponse.getId()</code> or as part of <code>FormResponse.getEditResponseUrl()</code>. In other words, I can't get the data from the Forms API that's needed to generate that link. I'd rather not use edit links, which they do support generating, to view my responses.</p>
  
  <p>My end goal is to have a link with the format shown above, in each row of my response form. A correct link with that format brings you to the individual response viewer page for the particular response in that row. i.e., I'd like to turn this:</p>
  
  <pre class="lang-none prettyprint-override"><code>+-----------+------------+
  |Question 1 | Question 2 |
  +-----------+------------+
  |Long answer| Another ans|
  +-----------+------------+
  |One more an| Additional |
  +-----------+------------+
  </code></pre>
  
  <p>Into this</p>
  
  <pre class="lang-none prettyprint-override"><code>+-----------+------------+------------------------------------------------------------+
  |Question 1 | Question 2 | View link                                                  |
  +-----------+------------+------------------------------------------------------------+
  |Long answer| Another ans| https://docs.google.com/forms/d/abc123/edit#response=def456|
  +-----------+------------+------------------------------------------------------------+
  |One more an| Additional | https://docs.google.com/forms/d/abc123/edit#response=ghi789|
  +-----------+------------+------------------------------------------------------------+
  </code></pre>
  
  <p>For reference, I tried generating the URL as <code>"https://docs.google.com/forms/d/" + formId + "/edit#response=" + responses[i].getId()</code>, but when visiting that URL it says the response ID is invalid.</p>
  
  <p>Is there a way, either via an Apps Script or other configuration, to produce a link back to each individual response in my output sheet?</p>