Automatically save inbound WebWMS2U message data in your own Google Sheet using Google Apps Script—without hosting a separate server.
When an enabled WebWMS2U automation rule triggers a webhook, WebWMS2U sends a POST request containing message data to the URL you configured. Google Apps Script can receive that payload, append it to a Sheet and return a JSON reply.
Phone | Message | TimestampIn your Sheet, go to Extensions → Apps Script and paste this code:
function doPost(e) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var data = JSON.parse(e.postData.contents);
// Append webhook data to the sheet
sheet.appendRow([
data.from || '',
data.message || '',
new Date(data.timestamp * 1000)
]);
// Return a reply in the format expected by WebWMS2U
return ContentService
.createTextOutput(JSON.stringify({ reply: "Thank you. Message received." }))
.setMimeType(ContentService.MimeType.JSON);
}
This script receives inbound webhook data from WebWMS2U, writes a new row and returns the reply “Thank you. Message received.” Adapt the field names if your webhook configuration sends a different payload.
https://script.google.com/macros/s/AKfycbx123abcXYZ/execOnly messages that match and trigger the configured automation rule are forwarded. Unmatched incoming messages are not sent to this webhook.
Here’s an example of the data WebWMS2U can send to your webhook URL:
{
"user_id": 123,
"device_id": "abc123",
"whatsapp_id": "60123456789@s.whatsapp.net",
"from": "60123456789",
"message": "Hi, can I get more info?",
"message_id": "XYZ987654",
"timestamp": 1722337200
}
user_id or message_id to track more detailsFor production integrations, also review the WebWMS2U webhook guide and API documentation.
It only takes 5 minutes to set up your free Google-hosted webhook — no server required!
Create Your Free Account