← Back to Tutorials

Tutorial: Automate Lead Collection with Zapier and Datalinky


This tutorial will guide you through creating a simple web form to collect leads and automate the process of adding these leads to a Google Sheet using Datalinky and Zapier.

Step 1: Create a Simple Web Form

Create an HTML form to collect lead information (name and email).

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Lead Collection Form</title>
    <h1>Lead Collection Form</h1>
    <form id="leadForm" action="https://your-datalinky-link" method="POST">
        <label for="name">Name:</label><br>
        <input type="text" id="name" name="name" required><br><br>
        <label for="email">Email:</label><br>
        <input type="email" id="email" name="email" required><br><br>
        <button type="submit">Submit</button>
        document.getElementById('leadForm').addEventListener('submit', function(event) {
            const formData = new FormData(this);
            fetch(this.action, {
                method: 'POST',
                body: formData
            }).then(response => {
                if(response.ok) {
                    alert('Lead submitted successfully!');
                } else {
                    alert('Failed to submit lead.');
            }).catch(error => {
                alert('Error: ' + error.message);

Step 2: Set Up Datalinky link

  1. Log in to Datalinky and create a new link.
  2. Copy the link URL provided by Datalinky.
  3. Replace https://your-datalinky-link in the form’s action attribute with the actual Datalinky link URL.

Step 3: Connect Datalinky to Zapier

  1. Log in to Zapier and click on “Make a Zap”.
  2. Choose Webhooks by Zapier as the trigger app.
  3. Select “Catch Hook” as the trigger event and click “Continue”.
  4. Copy the Custom Webhook URL provided by Zapier.
  5. Go back to Datalinky, edit your link, and add the Zapier Webhook URL as the destination URL.

Step 4: Create a Zap to Add Leads to Google Sheets

  1. In Zapier, after setting up the Webhook trigger, click “Continue”.
  2. Test the trigger to ensure Zapier receives data from Datalinky.
  3. Add an action step and choose Google Sheets as the app.
  4. Select “Create Spreadsheet Row” as the action event and click “Continue”.
  5. Connect your Google Sheets account and select the spreadsheet and worksheet where you want to add the leads.
  6. Map the form fields (name, email) to the corresponding columns in your Google Sheet.
  7. Test the action to ensure the data is added correctly to Google Sheets.
  8. Turn on the Zap.

Step 5: Test the Integration

  1. Open your web form and submit a test lead.
  2. Check your Google Sheet to confirm that the new lead appears correctly.