Created
March 8, 2023 06:28
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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