Connectors

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)

  1. In Google Cloud Console, create a project (or pick one) and enable the Google Sheets API.
  2. Go to IAM & Admin → Service accounts → Create service account. It needs no roles. Open it, then Keys → Add key → JSON. A key file downloads.
  3. Open your sheet, click Share and add the service account's email (it ends in iam.gserviceaccount.com) as an Editor.
  4. In Leadvane open Websites → Notifications → Add notification and choose Google Sheets (service account).
  5. 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.

One service account, many sheets

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

  1. Create a Google Sheet, then open Extensions → Apps Script.
  2. Replace the code with the script below and set TOKEN to a long random string.
  3. 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

  1. Click Deploy → New deployment, choose the type Web app.
  2. Set Execute as to Me and Who has access to Anyone, then Deploy and authorise.
  3. Copy the web app URL ending in /exec.

3. Connect it in Leadvane

  1. Open Websites → Notifications → Add notification and choose Webhook.
  2. Paste the URL with your token added: https://script.google.com/macros/s/…/exec?token=YOUR_TOKEN
  3. Press Test. A row for "Test Lead" appears in the Leads tab.
Why a token instead of the signature?

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.

Editing the script later

Use Deploy → Manage deployments → Edit → New version so the URL stays the same.