DEV Community

Collect leads in a Google Sheet with a free Apps Script webhook (no Zapier)

Dovetail Scripts on October 31, 2026

Zapier and Make are fine tools, but paying a monthly fee to move a form submission into a spreadsheet stings when you have ten leads a month. A Goo...
Collapse
 
hayrullahkar profile image
Hayrullah Kar •

I like that the caveats section admits the token in the page source only stops drive-by bots. One gap it misses is formula injection. appendRow treats a string that starts with = as a formula, so a visitor who types =HYPERLINK(...) or =IMPORTXML(...) into the name field gets a live formula in your sheet, and the later auto-reply script may read the computed result instead of what was typed. Prefixing any value that starts with =, +, - or @ with an apostrophe before appending keeps it as plain text. A smaller one: in a web app, getActiveSheet() resolves to the first tab, so if someone reorders the tabs the leads quietly land somewhere else. getSheetByName('Leads') pins the target.

Collapse
 
dovetailscripts profile image
Dovetail Scripts •

Both great catches, thank you. Formula injection is exactly the kind of thing that slips through when you test with polite data - appendRow happily evaluates a leading =, and the apostrophe prefix is the right fix. Same for getSheetByName('Leads') over getActiveSheet(); tab order should never decide where leads land. I'm folding both into the post. Appreciate the close read.

Collapse
 
hayrullahkar profile image
Hayrullah Kar •

Glad both were useful, and "testing with polite data" is a good way to put why this one slips past. Thanks for taking them on so openly, the post was already a clear walkthrough to build from.

Thread Thread
 
dovetailscripts profile image
Dovetail Scripts •

Thanks for reading that closely - catches like yours are what make the post better for the next person who builds from it.

Thread Thread
 
hayrullahkar profile image
Hayrullah Kar •

Thinking of the next person who builds from it is a nice way to see it, and that's exactly who the polite-data catch was for. Happy to have helped a little.

Collapse
 
dovetailscripts profile image
Dovetail Scripts •

Appreciate that, Hayrullah - the post is genuinely better for your catches.