SheetAPI Team
Tutorial Webhooks

Real-Time Webhooks: Get Notified When Your Spreadsheet Changes

Learn how to use webhooks to receive instant notifications when data changes in your Google Sheet — perfect for automation and real-time apps.

Back to Blog

What Are Webhooks?

Webhooks are automated messages sent from one app to another when something happens. Instead of constantly polling (asking "is there new data?"), webhooks push notifications to your app the moment something changes.

Think of it like the difference between:

With SheetAPI.pro webhooks, you get instant notifications when rows are added, updated, or deleted in your Google Sheet.

Why Use Webhooks?

✅ Real-Time Updates

No more waiting for scheduled syncs or manual refreshes. Changes propagate instantly.

✅ Reduce API Calls

Instead of polling every minute (wasting API quota), you only get notified when something actually changes.

✅ Build Reactive Apps

Create apps that respond immediately to data changes — perfect for dashboards, notifications, and automation.

✅ Lower Costs

Fewer API calls = lower costs and better performance.

Use Cases for Webhooks

1. Instant Notifications

Get alerted the moment something important happens:

2. Data Synchronization

Keep multiple systems in sync:

3. Automated Workflows

Trigger complex processes:

4. Live Dashboards

Update dashboards in real-time without polling:

How SheetAPI.pro Webhooks Work

Here's the flow:

  1. You configure a webhook URL in your SheetAPI.pro dashboard
  2. SheetAPI.pro monitors your Google Sheet for changes
  3. When a row is added, updated, or deleted → SheetAPI.pro sends an HTTP POST request to your webhook URL
  4. Your server/app receives the payload and takes action

Setting Up Your First Webhook

Step 1: Create a Webhook Endpoint

You need a URL that can receive POST requests. Here's a simple example using Node.js + Express:

const express = require('express');
const app = express();

app.use(express.json());

app.post('/webhook', (req, res) => {
    const { event, data } = req.body;
    
    console.log('Webhook received:', event);
    console.log('Data:', data);
    
    // Do something with the data
    if (event === 'row.created') {
        console.log('New row added:', data);
        // Send email, update database, etc.
    }
    
    res.status(200).send('OK');
});

app.listen(3000, () => {
    console.log('Webhook server running on port 3000');
});

Deploy this to Heroku, Vercel, Railway, or any hosting platform that gives you a public URL.

Step 2: Configure the Webhook in SheetAPI.pro

  1. Log in to your SheetAPI.pro dashboard
  2. Select your sheet
  3. Go to Settings → Webhooks
  4. Add your webhook URL (e.g., https://yourapp.com/webhook)
  5. Choose which events to listen for:
    • row.created — New row added
    • row.updated — Existing row modified
    • row.deleted — Row removed
  6. Save and test

Step 3: Test It!

Add a new row to your Google Sheet and watch your webhook endpoint receive the notification in real-time.

Webhook Payload Structure

Here's what SheetAPI.pro sends to your endpoint:

{
    "event": "row.created",
    "timestamp": "2026-02-07T12:34:56Z",
    "sheetId": "abc123xyz",
    "data": {
        "Name": "John Doe",
        "Email": "john@example.com",
        "Message": "Hello!",
        "Timestamp": "2026-02-07T12:34:50Z"
    },
    "rowIndex": 42
}

Fields explained:

Advanced: Webhook Security

To prevent unauthorized requests, SheetAPI.pro signs each webhook with a secret key. Verify the signature before processing:

const crypto = require('crypto');

app.post('/webhook', (req, res) => {
    const signature = req.headers['x-sheetapi-signature'];
    const secret = process.env.WEBHOOK_SECRET; // From SheetAPI.pro dashboard
    
    const hash = crypto
        .createHmac('sha256', secret)
        .update(JSON.stringify(req.body))
        .digest('hex');
    
    if (hash !== signature) {
        return res.status(401).send('Invalid signature');
    }
    
    // Process webhook...
    res.status(200).send('OK');
});

Webhook Examples

Example 1: Send Email on New Form Submission

app.post('/webhook', async (req, res) => {
    const { event, data } = req.body;
    
    if (event === 'row.created') {
        // Send email via SendGrid, Mailgun, etc.
        await sendEmail({
            to: 'admin@yourcompany.com',
            subject: 'New Contact Form Submission',
            body: `
                Name: ${data.Name}
                Email: ${data.Email}
                Message: ${data.Message}
            `
        });
    }
    
    res.status(200).send('OK');
});

Example 2: Post to Slack

const axios = require('axios');

app.post('/webhook', async (req, res) => {
    const { event, data } = req.body;
    
    if (event === 'row.created') {
        await axios.post(process.env.SLACK_WEBHOOK_URL, {
            text: `🚀 New submission from ${data.Name} (${data.Email})`
        });
    }
    
    res.status(200).send('OK');
});

Example 3: Sync to Database

const { Pool } = require('pg');
const pool = new Pool({ connectionString: process.env.DATABASE_URL });

app.post('/webhook', async (req, res) => {
    const { event, data } = req.body;
    
    if (event === 'row.created') {
        await pool.query(
            'INSERT INTO contacts (name, email, message) VALUES ($1, $2, $3)',
            [data.Name, data.Email, data.Message]
        );
    }
    
    res.status(200).send('OK');
});

No-Code Webhook Receivers

Don't want to write code? Use these platforms to receive and process webhooks:

1. Zapier

2. Make (Integromat)

3. n8n (Self-Hosted)

Troubleshooting Webhooks

Webhook not firing?

Receiving duplicate events?

Endpoint timing out?

Best Practices

Conclusion

Webhooks transform Google Sheets from a static data store into a real-time, reactive system. Whether you're building automation workflows, live dashboards, or notification systems, webhooks are the key to making your data work for you — instantly.

Ready to set up webhooks? Create your SheetAPI.pro account and start building real-time apps with Google Sheets today.

Ready to get started?

Turn your Google Sheets into a REST API in seconds

Start Free Trial