2025年10月20日月曜日

How to get an re-edit URL on Google Forms (Google フォームで再編集用URLを取得する方法)

If you want to edit data submitted in a Google Form that does not allow re-editing, you will need to obtain the re-edit URL via a Google Apps Script program.

*Anyone can edit the data if they know the re-edit URL, so please handle it with care. 


STEP 1. Outputting Google Form data to Sheets using "Link to Sheets"




STEP 2. Decide which column to save the re-edit URL in.


*This must be a column that will not be used and will not be answered, as it will be overwritten.

*Here, I assume that the data is stored in column D.



STEP 3. Set Google Apps Script in the Sheets.


1. Open "Apps Script" in the Extensions menu.



This will take you to the code entry screen shown below.

2. Copy the template of Google Apps Script

Access the link below, select all of the program code displayed, and paste it into the code section.



3. Change two settings.

1. saveTocolumn

Please specify the column number for which you want to put an edit URL. Please note that the selected column value is overwritten.

A = 1, B = 2, .... D = 4, .... 

If you specify "saveTocolumn" value is 4, the re-edit URL will be overwritten to column D.

2. formID

Please paste your Google Form's ID between the single quotes.
You can find the ID in the form's URL (between /d/ and /edit)



ex. formID
https://docs.google.com/forms/d/[formID]/edit#responses

3. Set the project name and save the Project in Google Apps Script


You should change the name of your project to something easy to understand.
For example, "Get a re-edit URL in Google Forms"
You can change the title of the united project by clicking on it.



After changing the two values, save your Google Apps Script.



STEP 4. Run the Google Apps Script


Before executing, please make sure there is no data in the column specified by saveTocolumn.

And then click the "Run" button.


The first time you do this, some approvals are required.

Click "Review permissions"

Click on the "Advanced" link.

Click on "Go to Untitled project (unsafe)" link.


Then, please allow all the permissions displayed.

If all goes well, information about the row where the re-edit URL was saved will appear, and the process should finish successfully with "Execution completed".


You should then be able to find the re-edit URL on the sheets.


*Of course, to be able to access the re-edit URL and re-edit, you will need to give permission on the Google Form side.
*Anyone can edit the data if they know the re-edit URL, so please handle it with care. 

Troubleshooting


1. If you see the following error on the sheet, it means that "saveTocolumn" is not set correctly in the code.





2. If you see the following error in your sheet, it means that the formID is not set correctly in your code.







20 October 2025 @kimipooh