Skip to main content

If a Typeform is linked to a google sheet, how can we retrieve the google sheet id in Typeform?

Can we have a unique ID for each typeform runtime?
Like a session id that's unique among all users and all surveys for that Typeform account.

For example, if a same user fills up the same survey form multiple times (maybe concurrently), there should be an ID to differentiate them. The session ID is more reliable than Submitted Date.
The session id can be generated when the form is load and persisted on submission

Business Case 1:
On Typeform submission, the typeform should provide the session_id in a out-of-the box defined variable that a 3rd party application can later use to query the submitted survey data

Business Case 2:
For a Typeform that is linked to a google sheet, the typeform should provide an out-of-the-box field that holds the google sheet_id

Example:
After a user submits a Typeform, the end screen can redirect the user to a link say
acme.com/survey?session_id=abcjd235&sheet_id=42325

The Target url application can parse the session_id and sheet_id from the url and use it to query the corresponding google sheet for the correct record.

Of course, for security, if we have encrypt functions built into Typoform, we can encrypt the ids and use it in the redirect url. The target application is responsible for decrypting the values.

Other notes:
A session_id should be unique to the Typeform account. No session_id should appear more than once within a single survey responses list or across multiple different survey types.
 

Hi @jervin31 This is an interesting request - thanks for asking! Since the integration is one-way, meaning data is sent to Google Sheets but not received from Google Sheets, we don’t have the option to show the Google Sheet ID within the Typeform builder. 

As for a unique ID, we do provide this! 😀

When you export your results, you’ll see these two fields: 

 

The network ID is specific to the respondent answering the form. This field will stay the same if the respondent has answered on the same device/network. 

However, the string you see here under the # is the unique response ID. This is unique for every response, regardless of the form or account. 

Hopefully this helps a bit, and I’ll share the idea about the Google Sheets ID to our product team!


Thanks @Liz , the Network ID and # and very valuable and fulfills half of my requirement!

For a Typeform, when I open the google sheet from the link in the 'Connect' tab:
 the unique ID column header is 'Token',
 there is no Network ID column,
 results ordered by oldest Submit Date at the top.

From the Typeform -> Responses, when I download the results to a csv file, 
 the unique ID coumn header is '#',
 there is Network ID column,
 results ordered with the latest Submit Date at the top.
 
Can the unique ID column header name be consistent? I prefer 'Token' over '#'. The '#' can be special character when the file is interpreted by certain applications.

Google sheet from the Connect link shows column header 'Submitted At'
The Responses UI shows column header 'Date'
The csv download from Responses page shows column header 'Submit Date (UTC)'

The Start Date and Stage Date are in the csv but not in the Google sheet or Responses page

Ask 1: Can all the columns be displayed in Google Sheet (Connect), Responses page and csv download?
of course, the Responses settings has option to enable/hide certain fields. If a field is disabled in these Settings, does it omit it only in the Responses UI or omit from the downloaded csv file too?

Ask 2: Can the column headers be consistent no matter if that column is viewed in the google sheet, Responses UI or downloaded csv?

Ask 3: The Token/# and NetworkID are useful. Which variables hold these values in the Typeform design, so I can use those fields to construct the redirect url?
Example: I should be able to say (pseudo-code)
acme.com/survey?token={token}&&networkid={network_id}

Ask 4: The connect tab has link to the spreadsheet (even though the link does not have gid in it).
Which Typeform variable holds the value of the spreadsheet url that we see in the connect tab?
I should be then able to use this variable to parse and pass in the redirect url
acme.com/survey?token={token}&&networkid={network_id}&&spreadsheet={spreadsheet_url}


 


@Liz  and @john.desborough , what is the field name for Token and Network Id and the corresponding spreadsheet link? I want to use these in my redirect URL at the end of the survey.

I also want to use the Token field in the ending screen as “Your survey number is #token”. 

 


Reply