Skip to content

Instantly share code, notes, and snippets.

@btray77
Created March 8, 2023 06:28
Show Gist options
  • Save btray77/f6314702da9b147f52a13bc09c75a970 to your computer and use it in GitHub Desktop.
Save btray77/f6314702da9b147f52a13bc09c75a970 to your computer and use it in GitHub Desktop.
Example of how to take a google sheet with names and phone numbers and submits to a form.
function submitForms() {
// Get the active sheet
var sheet = SpreadsheetApp.getActiveSheet();
// Get the data range
var range = sheet.getDataRange();
var values = range.getValues();
// Loop through each row of data
for (var i = 0; i < values.length; i++) {
var name = values[i][0];
var phone = values[i][1];
// Set the URL of the GET submit form replace this with flowtrack form submittion.
var url = "https://FormUrlGoesHere?name=" + name + "&phone=" + phone;
// Submit the form using the UrlFetchApp service
var response = UrlFetchApp.fetch(url);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment