Skip to main content

Automation run the limit


PauloPurcino
Forum|alt.badge.img+5

 My automation exceeded the run limit 2500 in just a few hours because I don't know how to control it! Can someone help me?

13 replies

ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8763 replies
  • January 15, 2024

The quickest solution would be to upgrade your pricing plan from Team to Business to instantly get more automation runs. 

Outside of upgrading, unfortunately, Airtable doesn't offer the ability to pay for more runs.

However, you can always try emailing support@airtable.com to ask them to reset your automation runs for the month. Not sure how long it will take Support to get back to you, though.

Since Airtable doesn't offer the ability to pay for more automation runs, this is one of the Top 20 Reasons that I recommend people outsource as many automations as they can to Make's automations & integrations for Airtable. Not only are Make's automations much more powerful & customizable than Airtable's native automations, but you can never run out of automation runs with Make because you can always pay for more automation runs. You can even set Make to automatically buy new automation runs for you when you run out.

There is a small learning curve with Make, which is why I’ve assembled a bunch of Make training resources in this thread to help.

And Make even created an entire Make Training Academy here.

i also give live demonstrations of how to use Make in many of my Airtable podcast appearances here:
https://www.youtube.com/watch?v=SbH9iE5ncCk&list=PLqssva4liHRwHhQIpTXekG8WObEoyC2F1


PauloPurcino
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • 9 replies
  • January 15, 2024
ScottWorld wrote:

The quickest solution would be to upgrade your pricing plan from Team to Business to instantly get more automation runs. 

Outside of upgrading, unfortunately, Airtable doesn't offer the ability to pay for more runs.

However, you can always try emailing support@airtable.com to ask them to reset your automation runs for the month. Not sure how long it will take Support to get back to you, though.

Since Airtable doesn't offer the ability to pay for more automation runs, this is one of the Top 20 Reasons that I recommend people outsource as many automations as they can to Make's automations & integrations for Airtable. Not only are Make's automations much more powerful & customizable than Airtable's native automations, but you can never run out of automation runs with Make because you can always pay for more automation runs. You can even set Make to automatically buy new automation runs for you when you run out.

There is a small learning curve with Make, which is why I’ve assembled a bunch of Make training resources in this thread to help.

And Make even created an entire Make Training Academy here.

i also give live demonstrations of how to use Make in many of my Airtable podcast appearances here:
https://www.youtube.com/watch?v=SbH9iE5ncCk&list=PLqssva4liHRwHhQIpTXekG8WObEoyC2F1


Do you Know how to control this empty rows created after run?Like this pic below that represent only single 1 run and gave me more 500 rows


ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8763 replies
  • January 15, 2024

Looking at your automation screenshots, I can see that you setup your automation to be an infinite loop that never ends. It says that when a record is created in Table 1, it should create a new record in Table 1. But when a new record is created in Table 1, it will create another record. That will go on infinitely.


PauloPurcino
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • 9 replies
  • January 15, 2024
ScottWorld wrote:

Looking at your automation screenshots, I can see that you setup your automation to be an infinite loop that never ends. It says that when a record is created in Table 1, it should create a new record in Table 1. But when a new record is created in Table 1, it will create another record. That will go on infinitely.


How to setup to run just a one row ?

I mean I don’t need this thousands empty rows.


ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8763 replies
  • January 15, 2024

I'm not sure what you mean. What are you trying to accomplish in your automation?


dilipborad
Forum|alt.badge.img+20
  • Brainy
  • 215 replies
  • January 15, 2024

Hello @PauloPurcino 

@ScottWorld is right. First, you need to define what you're trying to accomplish.

Based on your questions How to set up to run just one row?

If Record Created Trigger is not required then use Use Trigger type like Record Updated  OR Record Matches Conditions.

I think this will limit your automation run.

 


PauloPurcino
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • 9 replies
  • January 15, 2024
ScottWorld wrote:

I'm not sure what you mean. What are you trying to accomplish in your automation?


Sorry! I'm having an issue with my automation that is generating uncontrollable random blank rows in my table, and I don't want that! I just want it to create a new row with the necessary information related to my created automation and not generate a bunch of unexpected blank rows!


PauloPurcino
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • 9 replies
  • January 15, 2024
dilipborad wrote:

Hello @PauloPurcino 

@ScottWorld is right. First, you need to define what you're trying to accomplish.

Based on your questions How to set up to run just one row?

If Record Created Trigger is not required then use Use Trigger type like Record Updated  OR Record Matches Conditions.

I think this will limit your automation run.

 


Sorry ,I mean my automation is creating a bunch of unnecessary rows, and I would like it to only create one recording row when my automation is triggered!


PauloPurcino
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • 9 replies
  • January 15, 2024
ScottWorld wrote:

I'm not sure what you mean. What are you trying to accomplish in your automation?


Please ,have a look the number of unstoppable automation.I would like it run just when my new user fill a form with the necessary information


PauloPurcino
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • 9 replies
  • January 15, 2024

This table is a form that, when my user fills it out, automates distance data between two points using the Haversine formula and also automates the conversion of latitude and longitude using the Google Maps reverse geocode API. The problem is that when my user enters their information, in addition to the perfect response from my script, it is generating unnecessary blank lines and using all of my runs.


dilipborad
Forum|alt.badge.img+20
  • Brainy
  • 215 replies
  • January 15, 2024
PauloPurcino wrote:

Please ,have a look the number of unstoppable automation.I would like it run just when my new user fill a form with the necessary information


Hello @PauloPurcino 

I think your Automation scripts are overlapping as @ScottWorld  mentioned above. For now, just disable automation and verify it properly until it's fixed.

Please write your code(with removed credentials). Then some community members verify it.

Also, let me know that does you generate JS code using any AI Model(GPT, Bard, etc), Or if it's created by any specialist.


PauloPurcino
Forum|alt.badge.img+5
  • Author
  • Participating Frequently
  • 9 replies
  • January 15, 2024
dilipborad wrote:

Hello @PauloPurcino 

I think your Automation scripts are overlapping as @ScottWorld  mentioned above. For now, just disable automation and verify it properly until it's fixed.

Please write your code(with removed credentials). Then some community members verify it.

Also, let me know that does you generate JS code using any AI Model(GPT, Bard, etc), Or if it's created by any specialist.


Yes ,I generated JS by AI.

SCRIPT 1:

 

 

let table = base.getTable("Table 2"); // Substitua "SuaTabela" pelo nome da sua tabela

let records = await table.selectRecordsAsync();

for (let record of records.records) {
    let lat1 = record.getCellValue("latitude1");
    let lon1 = record.getCellValue("longitude1");
    let lat2 = record.getCellValue("latitude2");
    let lon2 = record.getCellValue("longitude2");

    if (lat1 !== null && lon1 !== null && lat2 !== null && lon2 !== null) {
        let distance = getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2);

        // Atualize o valor da coluna "distance" com a distância calculada
        await table.updateRecordAsync(record, {
            "Distance": distance
        });
    }
}

// Função para calcular a distância entre dois pontos em coordenadas de latitude e longitude
function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2) {
    const R = 6371; // Raio da Terra em quilômetros
    const dLat = deg2rad(lat2 - lat1);
    const dLon = deg2rad(lon2 - lon1);

    const a =
        Math.sin(dLat / 2) * Math.sin(dLat / 2) +
        Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
        Math.sin(dLon / 2) * Math.sin(dLon / 2);

    const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
    const distance = R * c; // Distância em quilômetros

    return distance;
}

// Função para converter graus em radianos
function deg2rad(deg) {
    return deg * (Math.PI / 180);
}
------------------------------------------
SCRIPT 2
 
let table = base.getTable("Table 2"); // Substitua "SuaTabela" pelo nome da sua tabela
let apiKey = "MY API KEY"; // Substitua "SuaChaveAPI" pela sua chave de API do Google Maps

let records = await table.selectRecordsAsync();

for (let record of records.records) {
    let lat = record.getCellValue("latitude1");
    let lon = record.getCellValue("longitude1");

    if (lat !== null && lon !== null) {
        let address = await getReverseGeocoding(lat, lon, apiKey);

        // Atualize o valor da coluna "endereco" com o endereço retornado
        await table.updateRecordAsync(record, {
            "endereco": address
        });
    }
}

// Função para realizar Geocodificação Reversa usando a API do Google Maps
async function getReverseGeocoding(latitude, longitude, apiKey) {
    let apiUrl = `https://maps.googleapis.com/maps/api/geocode/json?latlng=${latitude},${longitude}&key=${apiKey}`;

    let response = await fetch(apiUrl);
    let data = await response.json();

    if (response.ok && data.results.length > 0) {
        return data.results[0].formatted_address;
    } else {
        console.error("Erro ao obter o endereço:", data.error_message || "Erro desconhecido");
        return null;
    }
}

dilipborad
Forum|alt.badge.img+20
  • Brainy
  • 215 replies
  • January 15, 2024

Hello @PauloPurcino 

Both of the scripts are only doing updateRecordAsync (https://airtable.com/developers/scripting/api/table#update-record-async)

To trigger your automation which is called when a new row is created script needs to call this (https://airtable.com/developers/scripting/api/table#create-record-async)

Cross-check all other Airtable automation and also check external process automation tools(Zapier, Make.com). If there is anything that causes this issue.


Reply