Jump to content

Get the Form Edit Response URL in Google Sheets


Recommended Posts

When a user submits a Google Form, the entry is saved as a new row in the Google Spreadsheet that is collecting the responses. The Timestamp column in the spreadsheet can help you get the Edit Response URL for any entry in the form:

// when = e.namedValues["Timestamp"].toString()

const getFormResponseURL = (when) => {
  const formUrl = SpreadsheetApp.getActive().getFormUrl();

  const form = FormApp.openByUrl(formUrl);

  const responseDate = new Date(when);

  // Gets an array of all of the form's responses after a given date and time.

  const responses = form.getResponses(responseDate);

  if (responses.length > 0) {
    return responses[0].getEditResponseUrl();
  }

  return '';
};

Also see: Get Google Forms Data in Email

View the full article

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. to insert a cookie message