
How to Connect Typeform to Google Sheets and Automate Diversity Data Collection
Learn how to connect your Typeform survey to Google Sheets and automate the collection of diversity data with step-by-step instructions.
In this guide, we'll learn how to connect your Typeform survey to a Google Sheet and automate the process of updating diversity data.
Let's get started
First, go to the connect page of your Typeform survey and ensure it is connected to a Google Sheet. If it is not, connect it.
Connecting Typeform to Google Sheets





Add diversity data to Google sheet: Set up appscript




Formula to use:
function FillFormulas() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('<YOUR SHEET NAME>');
var lastRow = spreadsheet.getLastRow();
spreadsheet.getRange("<FIRST CELL OF DIVERSITY DATA COLUMN>").setFormula("=IF(<FIRST CELL OF OPT IN COLUMN>=\"I opt in to helping WoCl shape a more diverse climate workforce.\",INDEX(IMPORTRANGE(\"<YOUR TEAM DIVERSITY INFO URL>",\"DO NOT EDIT!A:N\"),MATCH(<FIRST TIMESTAMP CELL>,IMPORTRANGE(\"<YOUR TEAM DIVERSITY INFO URL>",\"DO NOT EDIT!M:M\"),-1)),\"Opted out\")");
var fillDownRange = spreadsheet.getRange(2,<NUMBER OF YOUR DIVERSITY DATA COLUMN>,(lastRow-1)); spreadsheet.getRange("<FIRST CELL OF DIVERSITY DATA COLUMN>").copyTo(fillDownRange);
}




