Skip to main content
All CollectionsImplementation guides(CRM) Integrations
Send Leads to Google Sheets via Webhook
Send Leads to Google Sheets via Webhook
Frencheska Peren avatar
Written by Frencheska Peren
Updated this week

Are you tired of dealing with Zapier issues when sending leads to Google Sheets? Well, you're in luck! In this article, we'll show you how to automate this process using Snitcher’s automation and a Google Sheets Webhook—no Zapier required.

Follow our step-by-step guide and save time by having contacts automatically revealed and transferred to your Google Sheets.


What You'll Need

Before we dive into the setup, make sure you have the following:

👉 A Google Sheet with the necessary columns (e.g., First Name, Last Name, Email, Job Title, LinkedIn URL)

👉 A Snitcher Account with automation access

👉 The Google Apps Script (we’ll paste this into the Google Sheet’s App Script Editor)


Copy the Google Sheet Template

  1. Click on this shared template link.

  2. Select “Make a Copy” to create your own version of the spreadsheet.

  3. Keep this file open—we’ll need it for the next steps.


Set Up the Google Apps Script

Open the Script Editor:

  1. In your copied Google Sheet, click on Extensions > Apps Script.

  2. Delete any existing code in the script editor.

Paste and Configure the Code:

3. Paste the provided script into the editor.

function doPost(e) {

try {

// Parse the incoming JSON payload

var jsonData = JSON.parse(e.postData.contents); // Open the spreadsheet by its ID and get the sheet (change "Sheet1" if your sheet name is different)

var ss = SpreadsheetApp.openById("INSERT SHEET ID HERE");

var sheet = ss.getSheetByName("Sheet1"); // Fetch existing emails from the sheet (assuming email is in column H)

var existingEmails = sheet.getRange("H:H").getValues().flat().filter(String); // Loop through each subject in the payload

jsonData.subjects.forEach(function(subject) {

// Check if email already exists

if (existingEmails.includes(subject.email)) {

Logger.log('Duplicate email found: ' + subject.email + ', skipping entry.');

return; // Skip this entry

}

// Build an array matching your sheet columns

var rowData = [

new Date(), // Timestamp

jsonData.event, // Webhook Event

subject.first_name, // First Name

subject.last_name, // Last Name

subject.title, // Title

subject.headline, // Headline

subject.linkedin_url, // LinkedIn URL

subject.email, // Email

subject.location, // Location

subject.company ? subject.company.name : "",

subject.company ? subject.company.domain : "",

subject.company ? subject.company.website : "",

subject.company ? subject.company.industry : "",

subject.company ? subject.company.founded_year : "",

subject.company ? subject.company.employee_range : "",

subject.company ? subject.company.annual_revenue : "",

subject.company && subject.company.geo ? subject.company.geo.country : "",

subject.company && subject.company.geo ? subject.company.geo.city : "",

subject.company && subject.company.geo ? subject.company.geo.postal_code : "",

subject.company && subject.company.geo ? subject.company.geo.street : "",

subject.company && subject.company.geo ? subject.company.geo.street_number : "",

// Company profiles:

subject.company && subject.company.profiles && subject.company.profiles.linkedin ? subject.company.profiles.linkedin.url : "",

subject.company && subject.company.profiles && subject.company.profiles.crunchbase ? subject.company.profiles.crunchbase.url : "",

subject.company && subject.company.profiles && subject.company.profiles.twitter ? subject.company.profiles.twitter.url : ""

]; // Append the row to the sheet

sheet.appendRow(rowData);

}); // Return a success response

return ContentService

.createTextOutput(JSON.stringify({ result: "success", message: "Data added" }))

.setMimeType(ContentService.MimeType.JSON);

} catch (error) {

// Return an error response if something goes wrong

return ContentService

.createTextOutput(JSON.stringify({ result: "error", message: error.toString() }))

.setMimeType(ContentService.MimeType.JSON);

}

}

4. Locate “Insert sheet ID here” in the code and replace it with your Google Sheet’s ID (found in the URL of your sheet).

5. Click Deploy > New Deployment.


Deploy the Web App

  1. Select “Web app” as the deployment type.

  2. Under Who has access, choose “Anyone”.

  3. Click Deploy and authorize the script when prompted.

4. Once deployed, copy the Web App URL—this is your webhook endpoint.


Integrate Webhook with Snitcher

Go to Snitcher Settings:

  1. Navigate to Snitcher > Settings > Integrations.

  2. Click “Create Webhook”.

Then configure the webhook:

3. Name your webhook (e.g., Google Sheets Webhook).

4. Paste the Web App URL copied from the previous step.

5. Click Create Webhook.


What's Next?

Now we need to set up an automation in Snitcher to send the contacts to your Google Sheet via the webhook.


Setting up the Automation in Snitcher

  1. In Snitcher, click on “Add an Automation”.

  2. Set up the automation to trigger on “New Lead”.

  3. Select the Segment you'd like to target.

  4. Select “Reveal Contacts” (right at the bottom of the page).

💡 To learn more about how automations work, check out Sales use cases of Automations or copy the example below.

Then configure contact reveal:

5. Select the Buyer Persona you'd like to use.

6. Decide how many contacts you want to reveal per company (e.g., two).

7. Select the webhook you created as the external destination and save.


Test the Webhook

Head Back to Google Sheets:

  • Wait for a new lead to trigger the automation in Snitcher.

  • Check your Google Sheet to see if the contacts are being added as expected.

🚨 This test depends on the automation we just set up. It might take a while before any companies trigger the automation and send data to Google Sheets.


Enjoy the Automation!

That's it! You've successfully set up an automated system to reveal contacts and send them to Google Sheets using Snitcher and a webhook—without Zapier. If you have any questions, refer to the step-by-step guide above or use the template provided.

Feel free to reach out if you have any questions.


✌️ Team Snitcher

Did this answer your question?