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?
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()o0];
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.
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!