Process new records sequentially

Is it possible to queue records for processing with an automation, rather than processing them simultaneously?

I have an automation that’s triggered by a record being created in Table A.

The automation checks for records in Table B and if it finds a match it links it to the new record in Table A. If no match is found then a new record is created in Table B and linked to the new record in Table A.

The problem I’m facing is that if two or more records are created in Table A in quick succession, the automation for the first record to be created hasn’t completed when the automation for the second record starts. This means that duplicate records can be created in Table B, when only one is needed.

Is the only option to stop using the ‘When record is created’ trigger and instead build something that processes all new records on a schedule? It would have to run every 15 minutes as it needs to be close to real-time.

Unfortunately, you wont be able to accomplish your idea of processing a batch of records on a schedule unless you know JavaScript, because Airtable’s Automations won’t natively let you perform actions on individual records within a batch of records that are found. You can only process records individually via scripting.

Unless someone else knows of a better idea, your best bet that doesn’t require any coding at all is to use Make.com for your automations. There is a checkbox in Make that you can select to process your records sequentially instead of simultaneously.

1 Like

Thanks Scott. I can write JavaScript, so I’ll try that route initially. Our organisation uses Zapier, and I don’t think I’ll be able to convince them to allow me to use make.com

This could work with a scripting action. It would take a 2688-2976 automation runs every month, though. You would also probably need to add a created time field to the table to help the script know the order the records were created.

Another option is to periodically dedupe.

1 Like

Hmm, I think I may be missing something, but could we just use Airtable’s “Link to another record” functionality to handle the creation of the new record?

So we make a field in Table A to link to Table B, let’s call that field “Link to Table B”, and every time a new record gets created in Table A, we put some sort of unique identifier into “Link to Table B”. That way you only end up with one record in Table B. The downside is that you’ll have multiple links to records in Table A, but I don’t know if that’s an issue for you?

E.g. Two records get created in Table A in quick succession, both of which have the same unique value, let’s say ‘Record 1’. Normally your automation is searching Table B for a record with the value ‘Record 1’, and if it doesn’t find it, it’ll create it.

Now, we just dump ‘Record 1’ into ‘Link to Table B’ twice. The first time this happens, a record will get created in Table B, and the second time this happens it’ll just add a link to the record in Table B; no more duplicates

Your method only works if you have an editable primary field in Table B that matches the value from Table A. However, that might not be the right primary field for Table B.

Ahh, yeah you’re right