CRAZY USECASE: Overloading app in a level that created hours delay in writing to Sheet

A api like the airtaible api would be great to work with glide tables.
Oh the airtaible gui would be grate for the glide tabke too.

should be I am “now” not “not”

Great news. Sounds like a neat solution @Darren_Murphy. The advent of the Glide webhook also (sometimes) removes the need for scheduled polling within Integromat since we can now tell it exactly when to look for stuff So the free tier becomes viable in many cases.

2 Likes

My time based trigger is in the Google Sheet, so it doesn’t cost anything on the Integromat side. Glide webhooks are great, but you need something to trigger them, which generally means some sort of user interaction. So not viable when you need something to run on a schedule.

3 Likes

Yes but this kills your operations in integromat and not based on a webhook

Exactly

How so?
It might be running every minute on the GSheet, but the Integromat webhook is only called if a breach is detected.

Are you sure? I think that every time it runs integromat consider this is operation.

Also, how would you triggers a webhook like this? By definition a webhook is listening to a certain url so not sure you can trigger it with a time based trigger and glide doesn’t have an app in integromat to perform watch data/row

Yes, that’s correct. The webhook is listening on a predefined URL, so you just need to post to that URL when necessary. It only counts as an Integromat operation when you send a post to the URL.

Maybe if I describe my scenario it might be clearer…

  • My app is used to track equipment outages (in this case, “equipment” is prime mover trucks moving shipping containers around the port of Singapore)
  • When one of these prime movers breaks down, the driver will call his foreman, and the foreman logs the breakdown in my app.
  • The SLA (Service Level Agreement) is that when one of these trucks breaks down, it must be replaced or repaired within 90 minutes
  • So, in my Google Sheet, I have a trigger script that runs every minute, that checks if there are any active breakdowns
  • If there are no active breakdowns, the script doesn’t do anything
  • If there are active breakdowns, it then checks each one to see how long since the breakdown occurred
  • If it’s been more than 90 minutes (SLA Breach), then it will send a POST to the Integromat web hook
  • The Integromat scenario then kicks into action, and email notifications are sent

So, even though the trigger is running every minute, for 99.99% of the time Integromat doesn’t even know about it. Integromat only comes into the picture if/when there is an SLA breach. In practice, this happens less than once a day. So the total cost on the Integromat side is less than one operation per day.

PS. @Jeff_Hager I dare you to find a way to do this within Glide :stuck_out_tongue_closed_eyes:

5 Likes

@Darren_Murphy

Be careful what you wish for. :rofl:

2 Likes

Yes I totally get that. We have quite a few customers using our Glide apps now and a single Integromat (standard) subscription to cover them all. So in our scenario it arguably makes sense to get as much of the “back end logic” into Integromat as possible and keep the Google Sheet as a clean data repository with minimal “brains”. I think there will invariably be times where each approach is appropriate. Main thing is WEB HOOKS are awesome!

3 Likes

We have also handled this with a service like Cronhooks. This allows you to schedule a webhook (via a webhook) for a specific time and date.

So, in your scenario, you’d use a webhook to schedule Cronhook to call the Integromat webhook in 90 mins time (at the point you logged the breakdown). 90 mins later Introgromat receives the webhook from Cronhook and checks to see if the breakdown is still active. It then takes appropriate action.

Yes, before you say, I’m scared of scripts…

2 Likes

:zipper_mouth_face:

:rofl:

1 Like

@Darren_Murphy hehe, don’t tempt me. :wink: I don’t think you’re going to get much better than your current process right now.

2 Likes

I agree 100%!

If the conditions allow you, one must choose/use a notification (a exception write) vía Webhook instead of polling when you integrate several applications.

What I’m learning now reading @Darren_Murphy ‘s reply is how to send a POST via script to fire a Webhook:

If it’s been more than 90 minutes (SLA Breach), then it will send a POST to the Integromat web hook

Would you mind to share this part of your code in order to learn how to do it?
I have a couple of cases that will need this great feature!

Thanks in advance for your help and your other posts about JSON btw!

Saludos

4 Likes

Yes, tomorrow.
Not now because I’ve had too many :beers:
:crazy_face:

7 Likes

I missed the part that your time trigger in on the sheet. Of course, no problem with integromat. This is what I was saying why I can’t use glide tables for time trigger.completlly agree

3 Likes

Here is a simple example…

    function send_integromat_webhook() {
      var subject = 'Test';
      var recipient = 'user@example.com';
      var body = 'Just testing';

      var obj = {
        subject: subject,
        recipient: recipient,
        body: body
      };

      var json = JSON.stringify(obj);
      var url = 'https://hook.integromat.com/<HOOK_ID>';
      var options = {
        method: 'POST',
        payload: json,
        contentType: "application/json; charset=utf-8",
      };
      var response = UrlFetchApp.fetch(url, options);
    }
6 Likes

Great @Darren_Murphy!!

I owe you a :pizza:… too many :beer: without feeding block your mind :upside_down_face:

Feliz día!

2 Likes