Wait Action

An action that I believe would be very useful would be a waiting action, this action exists in several types of programming, and they are very useful.

Example: Wait 5 seconds to do an action.

Yes, I vote for this. It would be awesome to have this, especially when during quizzes etc.And also to create amazing animations!

4 Likes

Exactly, that’s why I thought about this action.

1 Like

This could be done with a Webhook and Integromat’s Sleep Action.

1 Like

I don’t think do as these are asynchronous?

1 Like

There is a Tool module called Sleep that you can place between Webhook and Google Sheet modules that delays execution for a specified period of time.

The problem with this is that Glide does not have any cron system and as they have mentioned in the past will probably not be getting one. Your best bet is to write it in a script or go with Integromat or Zapier.

But Glide does not “wait” for the Integromat scenario to complete

Okay. Lets say you are making a boss combat tab in Robert Pettito’s gamification app. You want one idle gif to play for the boss and one action gif to play for the boss when the user clicks on the Fight button. Create a column named bossgif with a default value of 0.

Make an Idle boss image to show when bossgif is equal to 0, and an Action boss image set to show when bossgif is equal to 1.

Create a combo action for the Fight button that does the normal combat calculations but also increments bossgif by 1 and Sends a Webhook to Integromat with the user’s name or email address as the parameter to send. Then create an Integromat scemario that starts with a Webhook receiving the data from Glide. Pass that parameter through a Sleep Action set at 1 or 2 seconds to a Google Sheets set to Search Rows module searching for that parameter and sorting by that parameter. Then pass that parameter to a second Google Sheets module to Update a Row, with Row Number set as “Row Number” from the previous Google Sheet module. Then set the value of bossgif to update to 0.

Essentially, your user will click the fight button. The idle image of the boss will disappear and the action image of the boss will appear. Glide sends the webhook to Integromat. Integromat waits 1-2 seconds then searches the Google Sheet for the username or email sent and selects that row. Then Integromat updates bossgif cell to 0 in the Google Sheet where that user’s row is. Glide notices the change. The action image of the boss will disappear and the idle image of the boss will appear.

2 Likes

FYI - I’m gonna give n8n a look as (maybe) an alternative to zapier and integromat https://www.n8n.cloud/ you can never have enough options :wink:

image

2 Likes

Very clever :+1:

This is the exact scenario I was thinking when I read the title of this post!

If Glide implements a wait action or if there was a way to send a doGet webhook to an Apps Script with a Utilities.sleep(milliseconds) function in the script then there would be no need for third party $olutions.

I see what you mean with that added step in Integromat, but it’ll be interesting to see how much you can rely on the sheet change being communicated back to Glide in a “reasonable” time.

Disregard. Webhook is unreliable. I also tried onChange() functions but those mess up the sheet data. Just have to wait and hope.

Pun intended?

I actually came across a need for this yesterday. I use a script to automate the translation of text to base64 so I can pass it as a parameter in a webview. Problem is, it takes 10 seconds for that script to run, so if users get to the screen prior to the script running the webview displays the wrong info.

So, really, in my case we just need a way to convert items to base64 within Glide
@mark?

Could you be more specific, please? Does Glide not call your webhook?

I can say that I use webhooks a lot and they are sent only in about 80% of the time without any logic to it.

Here is a scenario we have in one of the apps as an example:

We have created a kind of chat where the user can open a ticket and when the admin answer it supposed to send a webhook to integromat and then a text message to the user. When the user go back to the app he can either close the ticket or send another message to the admin which 8n his turn answer and send another webhook.

This process can take place up to 5 times so 10 webhooks at the most (5 on user side and 5 in the admin).

All the admin’s webhooks are sent from the same button with find different internal scenarios based on the stage of the communication (i.e answer 1… Answer 2 etc.) But all of them send to the same webhook and in the same template.

We tested it by now 100 times at least and in each time only 3-4 out of the admin’s webhooks are sent and same for the user. The thing is that in each test, different stages are sent or not sent without any logic.

Glide calls the webhook, no problem. Integromat even processes its actions and the change is sent to the google sheet in about 1 second. The problem is then between Google Sheet and Glide. Sometimes Glide shows the change in a few seconds, other times Glide shows the change five minutes later.

3 Likes

Please let me know how I can reproduce that. That should not happen.