I am a beginner, so sorry if this is a dumb question.
I am trying to get an email alert triggered if there is a row that was updated by Zapier with a low NPS value. This is on column G.
I found a
relevant tutorial, edited the script slightly and linked it to the Google sheet linked to the form. This is the function that is supposed to get the NPS value upon edit. The trigger was set to "on form submission".
I think the script doesn't work for my purpose because the sheet updates by a form and therefore is not "active".
function checkLowNPS(e)
{
var range = e.range;
if(range.getColumn() <= 7 &&
range.getLastColumn() >=7 )
{
var edited_row = range.getRow();
var status = SpreadsheetApp.getActiveSheet().getRange(edited_row,7).getValue();
if(status < '9')
{
return edited_row;
}
}
return 0;
}
I tried reading the class scriptApp page, but I couldn't figure it out. How can I update this script to do what I want?
Thank you in advance!
Edited to correct Google Forms to Zapier - I thought the sheet was linked to Google forms but the input is on Typeform and the data is sent to Gsheets via Zapier.