Help

Re: Conditional Automation only working sometimes?

Solved
Jump to Solution
830 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Mike_Pechter
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey everyone,

I’m having an issue with a conditional automation. Everything appears to be triggering and working correctly when things happen slowly. However, I made a script that is meant to set the conditions for another trigger. It seems like this is happening too quickly, and the automation is only triggering once instead of a few times.

Screen Shot 2022-02-08 at 9.41.57 AM

The script affects the K1 Override? field. My organization has to run a random lottery for our kindergarten class, and that is what the script is doing. Whoever is selected, it writes in “Selected”,
otherwise “Not Selected”.The Status field has a formula that notices this and updates accordingly. The automation is triggered by the Status field.

ezgif.com-gif-maker

Here’s a screenshot of the trigger’s criteria:

Main Criteria

And one of the individual conditional actions:

K1 Criteria

Has anyone experience this? Where an automation gets overloaded or something?

  • Mike
1 Solution

Accepted Solutions
Mike_Pechter
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Alyssa,

Thanks so much for your help! I tried this out, and was able to make a delay with the following:

function timeout(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

async function test(ms) {
    await timeout(ms);
}

await test(300);

This still didn’t seem to be working. So I tinkered with the trigger conditions. Instead of having multiple criteria (with OR), I tried just “when record is updated”, focusing on that field. By simplifying this, it seems like Airtable can more easily handle the rapid triggers, and it worked!

Thanks for your support. I hope someone else can benefit from this.

See Solution in Thread

2 Replies 2
Alyssa_Buchthal
8 - Airtable Astronomer
8 - Airtable Astronomer

Yes, AT automations have a poll time built in. Even when they say “instant”, I’ve found it can be up to 2 minutes. If you can script in a wait to prevent super-rapid changes, that would be your best bet to get this one working.

Mike_Pechter
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Alyssa,

Thanks so much for your help! I tried this out, and was able to make a delay with the following:

function timeout(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

async function test(ms) {
    await timeout(ms);
}

await test(300);

This still didn’t seem to be working. So I tinkered with the trigger conditions. Instead of having multiple criteria (with OR), I tried just “when record is updated”, focusing on that field. By simplifying this, it seems like Airtable can more easily handle the rapid triggers, and it worked!

Thanks for your support. I hope someone else can benefit from this.