# Using Google App Scripts to send a webhook for new or updated rows in Google Sheets

**URL:** <https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788>\
**Category:** Community Archive\
**Tags:** webhooks\
**Created:** [January 16, 2023, 9:52am UTC](https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788 "2023-01-16T09:52:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![EyalGershon](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/eyalgershon/32/6551_2.png) [@EyalGershon](https://community.make.com/u/EyalGershon)\
**Post date:** [January 16, 2023, 9:52am UTC](https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788/1 "2023-01-16T09:52:29Z")

</div>

Hey Guys and Gals,  
Since the Slack workspace is now officially dead, its about time I start getting involved in this amazing community that was built by @Michaela-Inactive, Hopefully this fits into the nerd zone.

Most of us are using the Google Sheets make application in one way or another but I find it a little limited. We are able to get a webhook in real time but this requires installing a chrome extension and still will waste some tasks since we are not able to control the exact condition of when the webhook is triggered.  
This means we have to concede wasting a few tasks and controlling the execution via filters.

Since this is the nerd zone I thought it would be the perfect place to share my Medium story - [https://medium.com/@eyalgershon/sending-a-webhook-for-new-or-updated-rows-in-google-sheets-e0c9d6a8cb45](https://medium.com/@eyalgershon/sending-a-webhook-for-new-or-updated-rows-in-google-sheets-e0c9d6a8cb45)

If you have any questions regarding customizing or using this script, by all means let me know and I will be happy to help.

---

<div class="post-metadata">

**Author:** ![BruniTho](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/brunitho/32/9697_2.png) [@BruniTho](https://community.make.com/u/BruniTho)\
**Post date:** [June 9, 2024, 1:28pm UTC](https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788/4 "2024-06-09T13:28:39Z")

</div>

this is really neat @EyalGershon !!  
It also has the added advantage of being possible to set this up to trigger even when changes are made via API. Since the Make plugin works as a webapp, it doesn’t pick those up, only manual changes made from a browser.

---

<div class="post-metadata">

**Author:** ![Justin\_Duveen](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@Justin\_Duveen](https://community.make.com/u/Justin_Duveen)\
**Post date:** [August 4, 2024, 5:11pm UTC](https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788/5 "2024-08-04T17:11:51Z")

</div>

Thanks for your guidance! I also have a Google Form which automatically updates a Google Sheets file and I wanted this update to then auto trigger my [Make.com](http://Make.com) automation. I tried using the [Make.com](http://Make.com) integration built into Google Sheets but it didn’t work.

I managed to find some code that works and sends the last row added to the [Make.com](http://Make.com) workflow:

Step 1: Click Extensions, then Scripts, Add this to the Script window and save (change the webhook name to your webhook):

function onFormSubmit(e) {  
// Get the sheet where form responses are stored  
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();

// Get the last row of data  
var lastRow = sheet.getLastRow();

// Get the data from the last row (the new submission)  
var data = sheet.getRange(lastRow, 1, 1, sheet.getLastColumn()).getValues()[0];

// Get the headers (column names)  
var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];

// Create an object to store the form data  
var formData = {};

// Pair each header with its corresponding value  
for (var i = 0; i \< headers.length; i++) {  
formData[headers[i]] = data[i];  
}

// Convert the data to JSON  
var payload = JSON.stringify(formData);

// Your [Make.com](http://Make.com) webhook URL  
var webhookUrl = “YOUR\_MAKE\_WEBHOOK\_URL\_HERE”;

// Set up the options for the HTTP request  
var options = {  
“method”: “post”,  
“contentType”: “application/json”,  
“payload”: payload  
};

// Send the data to [Make.com](http://Make.com)  
try {  
UrlFetchApp.fetch(webhookUrl, options);  
Logger.log(“Data sent successfully to [Make.com](http://Make.com)”);  
} catch (error) {  
Logger.log("Error sending data to [Make.com](http://Make.com): " + error);  
}  
}

Step 2: Add a trigger (on the left hand side click on Triggers)  
To set up the trigger:

- Click on the clock icon (Triggers) in the left sidebar.
- Click the “+ Add Trigger” button at the bottom right.
- Set the following options:
  - Choose which function to run: `onFormSubmit`
  - Choose which deployment should run: `Head`
  - Select event source: `From spreadsheet`
  - Select event type: `On form submit`

- Click Save.

Hope this helps others!! Was pulling my hair out for this one!

---

<div class="post-metadata">

**Author:** ![EyalGershon](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/eyalgershon/32/6551_2.png) [@EyalGershon](https://community.make.com/u/EyalGershon)\
**Post date:** [August 6, 2024, 5:58am UTC](https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788/6 "2024-08-06T05:58:12Z")

</div>

Nice one, I have another Medium post just about that 🙂 [Sending a Webhook for each Google Forms Submission | by Eyal Gershon | Medium](https://medium.com/@eyalgershon/sending-a-webhook-for-each-google-forms-submission-a0e73f72b397)

---

<div class="post-metadata">

**Author:** ![E12](https://avatars.discourse-cdn.com/v4/letter/e/97f17d/32.png) [@E12](https://community.make.com/u/E12)\
**Post date:** [July 16, 2025, 12:55am UTC](https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788/7 "2025-07-16T00:55:22Z")

</div>

Thanks @EyalGershon for sharing. For any updates within a cell in Google sheet, I want an event to be created in Google calendar. DO you have a App script for this? thanks!

---

<div class="post-metadata">

**Author:** ![EyalGershon](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/eyalgershon/32/6551_2.png) [@EyalGershon](https://community.make.com/u/EyalGershon)\
**Post date:** [July 16, 2025, 6:14am UTC](https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788/8 "2025-07-16T06:14:56Z")

</div>

Hey there,  
I have another medium post exactly for what you are looking for - [Sending a Webhook for New or Updated Rows in Google Sheets | by Eyal Gershon | Medium](https://medium.com/@eyalgershon/sending-a-webhook-for-new-or-updated-rows-in-google-sheets-e0c9d6a8cb45)

The only thing you need to take into account is you need to remove this part from the first if condition:  
e.changeType==“INSERT\_ROW”  
so it will only trigger for a change and not for inserting new rows. Also, if you want to listen to changes in a specific column you need to edit column\_to\_watch to watch the desired cell.  
Let me know if this works for you.

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [November 20, 2025, 1:19pm UTC](https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788/9 "2025-11-20T13:19:33Z")

</div>



---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [November 20, 2025, 1:19pm UTC](https://community.make.com/t/using-google-app-scripts-to-send-a-webhook-for-new-or-updated-rows-in-google-sheets/6788/10 "2025-11-20T13:19:35Z")

</div>


