Google Sheets
Append each lead as a new row in a spreadsheet you own. There are two ways: the native connector (recommended: no code, uses a Google service account) or an Apps Script web app behind the webhook connector.
Native connector (service account)
- In Google Cloud Console, create a project (or pick one) and enable the Google Sheets API.
- Go to IAM & Admin → Service accounts → Create service account. It needs no roles. Open it, then Keys → Add key → JSON. A key file downloads.
- Open your sheet, click Share and add the service account's email (it ends in
iam.gserviceaccount.com) as an Editor. - In Leadvane open Websites → Notifications → Add notification and choose Google Sheets (service account).
- Paste the spreadsheet ID (the long part of the sheet URL between
/d/and/edit), the tab name, and the whole key file. Press Test.
Each lead becomes one row with these columns: Received, Name, Email, Phone, Tier, Score, Website, Form, AI summary, Page and All fields (JSON). Add a header row yourself if you want one. The key is stored encrypted and is never shown again.
You can reuse the same key for every client: share each client's sheet with the same service account email.
Alternative: Apps Script web app
Use this if you can't create a Google Cloud project. It uses a small script with the webhook connector.
1. Add the script to your sheet
- Create a Google Sheet, then open Extensions → Apps Script.
- Replace the code with the script below and set
TOKENto a long random string. - Click Save.
const TOKEN = 'replace-with-a-long-random-string';
const SHEET = 'Leads';
function doPost(e) {
if (!e || e.parameter.token !== TOKEN) {
return ContentService.createTextOutput('forbidden');
}
const lead = JSON.parse(e.postData.contents);
const book = SpreadsheetApp.getActiveSpreadsheet();
const sheet = book.getSheetByName(SHEET) || book.insertSheet(SHEET);
if (sheet.getLastRow() === 0) {
sheet.appendRow(['Received', 'Name', 'Email', 'Tier', 'Score', 'Form', 'Summary', 'Page', 'UTM source', 'All fields', 'Lead ID']);
}
sheet.appendRow([
new Date(lead.created_at), lead.name, lead.email, lead.tier, lead.score, lead.form, lead.summary || '',
(lead.meta && lead.meta.page_url) || '', (lead.meta && lead.meta.utm && lead.meta.utm.utm_source) || '',
JSON.stringify(lead.data), lead.id,
]);
return ContentService.createTextOutput('ok');
}2. Deploy it as a web app
- Click Deploy → New deployment, choose the type Web app.
- Set Execute as to Me and Who has access to Anyone, then Deploy and authorise.
- Copy the web app URL ending in
/exec.
3. Connect it in Leadvane
- Open Websites → Notifications → Add notification and choose Webhook.
- Paste the URL with your token added:
https://script.google.com/macros/s/…/exec?token=YOUR_TOKEN - Press Test. A row for "Test Lead" appears in the Leads tab.
Apps Script can't read request headers, so it can't check X-Leadvane-Signature. The secret token in the URL keeps strangers from writing to your sheet. Treat the full URL like a password.
Use Deploy → Manage deployments → Edit → New version so the URL stays the same.