How to provide a unique ID (hidden from the users ) to the TypeForm questions | Community
Skip to main content
Answered

How to provide a unique ID (hidden from the users ) to the TypeForm questions

  • November 10, 2023
  • 3 replies
  • 345 views

Hi,  i Have a list of questions in a google sheets and based on the answers received, intend to create some useful insights using another library. Is there a way where I can associate each questions in TypeForm to a unique ID which is hidden from the users but is available in the downloaded responses in google sheet

Best answer by Liz

Hi @psaini Happy Fri-yay! You can find unique IDs for each of the questions using the Response API, but this information doesn’t pass to a Google Sheet, at least through our native integration. Would you have to use Google Sheets or would it be possible to use the Responses API? 

View original

3 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 15035 replies
  • Answer
  • November 10, 2023

Hi @psaini Happy Fri-yay! You can find unique IDs for each of the questions using the Response API, but this information doesn’t pass to a Google Sheet, at least through our native integration. Would you have to use Google Sheets or would it be possible to use the Responses API? 


  • Navigating the Land
  • 1 reply
  • June 22, 2025

It’s been a while since this post, but I wanted to update everyone on a way to update Typeform information into Google Sheets. Here’s what ChatGPT told me, and it worked perfectly.

Solution: Use Typeform + Google Sheets + Apps Script

Step 1: Connect Typeform to Google Sheets

  • Go to your Typeform account → the form you're using.

  • Under Connect, add the Google Sheets integration (native integration).

  • Choose to send responses to a specific sheet (create a new one or select your referral sheet).

 - This will populate the form responses into a Google Sheet in real-time.

Step 2: Use Apps Script to Generate Unique IDs

Now that the form data is going into Google Sheets, you can use an Apps Script logic to generate an external ID.

 

The code is as follows (Please not that “External ID” was my verbiage for the unique ID I was trying to generate):

 

function onFormSubmit(e) {
  const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Typeform Responses");
  const range = sheet.getDataRange();
  const numRows = range.getNumRows();

  for (let i = 2; i <= numRows; i++) {
    const row = sheet.getRange(i, 1, 1, sheet.getLastColumn()).getValues()[0];
    const externalIdCell = sheet.getRange(i, sheet.getLastColumn()); // Last column for External ID
  }
}
 

 

Hopefully this helps someone. If you need more information on how to use App Scripts in Google Sheets, just “Google” how to generate unique ID’s in Apps Script. 


Grace
Community Team
Forum|alt.badge.img+5
  • Community Advocate
  • 2765 replies
  • June 23, 2025

Hey ​@Mylz555 welcome to the community and thanks for sharing your suggestion here too 😊 if anyone tries it out, let us know how you get on! 


Reply