I need help: a custom action is not working correctly

Example
Action1: Set column
Action2: Add row
Action3: Set column <---- This set column don’t work

This is the action


This action work

This action don’t work

And this is why I use scripts at zero cost and zero frustrations.

Could you tell me more?

Well I made a script that allows for texts or emails to be sent at no cost to you. It is triggered by changes in the sheet and doesn’t require you to add it to your buttons. Here’s the link.

Ah!!

Your Variable Column is set to 1 as flag to indicate the process is running, later you call a Webhook and finally, you reset the flag (0) to notify customer that everything is done… right?

The problem here is that Glide doesn’t wait for Zapier (there is no pause) and your Column has 2 values so fast that technically you will see the last value (0) always …

Although the Actions work as a sequence, each step is executed without waiting the previous one. To sum up, there is no a kind of pause or delay between 2 steps.

What about if you force that “completion flag” creating a new step in Zapier? Try making a completion flag in Zapier writing a 0 (or any value) into a cell in your GS. If that cell is different to empty then, the action was completed!

I hope it helps you.

Saludos

My problem is that the value stays at 1 instead of returning to 0
I do not need to wait for the zap to complete, but simply to lock the button so that it does not press more than once, then by setting the variable to 1 the key disappears … by setting the variable to 0 the key reappears … the problem is that the variable stays at 1
I can try to change the value via a new zap … but it really gets too long

So in that brief moment that the button disappears and reappears (assuming it worked), are you allowing the user to submit again? I am aware that you are trying to address the issue of multiple submissions, but I wonder how effective that split second hide and reappear of the button would prevent multiple submissions. I know @Darren_Murphy has speculated that sometimes actions may run all at once and possibly run out of order. I wonder if that’s the case here, where it may be setting the value to 0, but it does it BEFORE it sets the value to 1, so you end up with a final value of 1.

I would probably rethink the logic a little bit. What I would maybe consider doing…instead of setting the column value to 1…set it to the current date/time. Then in the sheet add a math column to add 5 seconds to that date/time. Then set a visibility condition on the button to only show if the math column is before Now. Then you shouldn’t need a second Set Column action. If it all works, hopefully the user will click on the button, it will set the current date/time and the math column will calculate the date/time to be greater that Now for 5 seconds, which will hide the button. After 5 seconds, the button should come back.

2 Likes

I’ve seen enough evidence now to be fairly convinced this is true.

hmm, I wonder if that technique might help with my “return to top of the screen” challenge (which I never found a satisfactory solution for). I’m skeptical, but I’ll give it a try…

2 Likes

Hmm, possibly, but I wonder if you’d still run into that 5 or 10 second delay for dates to update in the glide data. Might be fine to temporarily hide a button, but might be too slow for your return to top situation.

1 Like

Very interesting … I try :slight_smile:

1 Like

It works … thanks for the help :smiley: :smiley: :smiley: :smiley:

2 Likes

Damn, I thought I solved the problem… unfortunately I keep getting double calls to the webhook :pensive: :pensive: :pensive: :pensive:

I know that column set values and add rows will run in the order you set them in relation to one another. Aside from those 2 actions I do not know.

I solved the problem by creating my own custom API to send mail. If the id that comes to me has already been processed, then I skip the operation.