↗️ Webhook Action Tutorial

Okay, so if I’m understanding correctly, what you need to do is send the values of several new rows as a parameter (or series of parameters) to your webhook, yes?

What about if you were to generate a Joined List column and use that?
With a joined list, you can reference columns in any table, so getting at the data you need shouldn’t be a problem. If it needs to be filtered, then you could create template columns in each of the source and target tables, create a relation using those two template columns, and then build your joined list through that relation.

Would that work for you?

Hey Manan, I found a way to trigger script from webhook action.
It’s by Deploying it as a web app.

Let’s have a look at the code of the WhatsApp Message trigger.



function doGet(e) {

return ContentService.createTextOutput("This is a GET Request!");

}

function doPost(e) {

var body = JSON.parse(e.postData.contents);
Logger.log(body);
var name = body["params"]["Name"]["value"];
var message1 = body["params"]["Message"]["value"];
var number = body["params"]["Number"]["value"];

var payload = {
    "username": "YOUR_USERNAME",
    "password": "YOUR_PASSWORD",
    "receiverMobileNo": number,
    "receiverName": name,
    "message": message1,
    //  "message": message2,
    //  "filePathUrl":image,
}

var options = {
    'method': 'post',
    'payload': payload
    // 'contentType': 'multipart/form-data',
};
var url = "https://app.messageautosender.com/message/new";
var response = UrlFetchApp.fetch(url, options);

}

After Saving this file, click on Deploy (Blue Button on right side of the script window)
Then, Add deployment as a web app,
Change Access to anyone, and tap deploy.
Copy URL and paste it to Webhook Action on Glide.
That means It’ll trigger this web app URL when clicked.

Important: You’ve to deploy every time when you change the code snippets.

Paste any kinda function to doPost() function, you can trigger that from the glide app.

9 Likes

Yes, thank you! The joined list was the key.

I’m not sure if I’ve implemented the sequence in Zapier in the most efficient way, but it’s working! The sequence: add a new item from a form in the app, custom action adds three events (rows) to the calendar sheet, then triggers the webhook with the value set to the joined list of all three events. Then in Zapier, split text action to split the joined list into three items, split text action to split the first item, create google calendar detailed event, split text action to split the second item, create google calendar detailed event, split action to split the third item, create google calendar detailed event. (It seems like I should be able to tell Zapier in one action to create a google event for each item, but I couldn’t figure out how to do that).

Btw, I wasn’t able to create a new webhook in the custom actions editor. I made a button on a hidden tab and configured the webhook there, then was able to select the webhook in my custom action. Not sure what I was doing wrong there.

Thank you again for your help.

1 Like

Really cool :sunglasses: now this is worth playing with.

1 Like

Wow this changes the game for many of my apps!
Thanks for this.

4 Likes

Also, this method looks a like cost effective. Even Rapid too.

2 Likes

Yeah, that’s a known issue

Glad you got it working :+1: