Do I need a Google sheet to use a webhook for Glide?

I created my user table in Glide before I knew anything about webhooks or other applications that might require google sheets. My Glide user table utilizes A LOT of columns and, if possible, I would like to NOT have to recreate it on a Google sheet in order to use tools like Intergromat (Make), but is that what needs to happen? Is there a way to work around it?

I am seeking to use Payhere.co to add a tiered subscription to my app using a webhook… but I realized that the examples I have seen require the use of Google sheets. So do I need to recreate my glide user sheet as a Google sheet? Or is there some way keep it and have the webhook speak to a google sheet that would relate to the user id or something like that?

Hi @GeneDrea , I have configured many PayHere flows before and there are multiple options for you here. For your question first, you don’t need a Google Sheet to use a webhook in Glide since we have the Glide API now (providing you’re on Pro).

The key with the API for Glide Tables is that you must know the rowID of the user in advance, and this is a bit tricky with the PayHere API itself.

PayHere sends two payloads on the first payment of the user, subscription.created and payment.success. We can add the rowID of the user as a parameter in the payment link, but it ONLY gets sent in the payment.success payload. For the next payments, only the payment.success payloads are sent.

The payment.success payload doesn’t get sent in payments that the user uses a discount code that brings the total to under the Stripe’s minimum limit (I believe that’s 0.5 USD). Only the subscription.created payload gets sent in that case. If the code is active forever for that subscription, I believe the payment.success payload never gets sent to the webhook.

So, here are your options:

  • With Glide Tables only:

When a new user is created, add a webhook to Make to create a new row in a data store. Your data store just needs to contain the user’s email and the rowID. Then, when any PayHere payloads come in, you can lookup the user’s rowID and make a HTTP call to Glide Tables to update the row’s info. This is assuming you’re storing the payment info in the same row as the user’s Profiles table row.

  • With Google Sheets:

You can connect a Google Sheet to help with this case, creating a new table to store the user’s email, the PayHere subscription status and the last payment timestamp.

When the payload comes from PayHere, you can use a Google Sheets search to search the PayHere’s customer email in the Google Sheet table. If that exists, you update the info of that row with the info from PayHere. Else, you create a new row in that table.

If you want to reduce the sync time between Google Sheets and Glide, you can utilize the Glide API on that Sheet, but I would advise getting used to the API first before approaching that.

6 Likes

I have deep gratitude for your willingness to explain this to me in such detail. THANK YOU!:pray:t5:

Could you offer me some ideas about why Row ID is not showing up in Make? I have utilized the Glide API and it does not show up as one of the property/values. I set it as one of the parameters in the payment link as you as you instructed in my Glide sheet. I am wondering what part I might be missing.

I have gone back and forth trying to do some things, and have a few screen shots. I wasn’t sure what codes should be protected and which were okay to show, so I covered a few things on the screenshots. Perhaps my error will be more visible to those more experienced.

Thank you in advance.



Seems like you’re missing this part.

For any new users I have the webhook to send their email and rowID to a data store in Integromat.

Then in my PayHere scenario, I look up that table to find the customer’s email and make the right HTTP call back to Glide.

Those are 2 different scenarios.

For your screenshot here, although we’re not using it in the flow, the right param to use if you want to add a custom field to your parameter is custom_field_[field name]. For example:

3 Likes

Thank you! This is so helpful. I am just wondering why the parameters do not show up for me in the data store like they do for you. It does not seem to be finding it. I don’t have “params” options and still do not see the Row ID as an option.

Have you sent a sample param to the webhook (by creating a subscription on PayHere)?

This is what I have done. But I don’t know what you mean by a “sample param”.

2022-04-22 (7)
2022-04-22 (8)


So what’s not showing in your case? Do you mean you want the custom rowID field to show up?

I mentioned that it is not sent in the subscription.created payload but in the payment.success payload. And the payment.success payload does not always get sent, so you have to rely on an additional data store to do it.

I should probably create a new video …

4 Likes

Yeah, we definitely need an update with the Glide API version.