Mar 28, 2023 05:18 AM - edited Mar 28, 2023 06:19 AM
I've a table that generates records through the Airtable built-in form. Each record comes with an ID from an external software. The ID is connected to accounts in this external software, so account 1 could have ID: 123, account 2 could have ID: 1234.
What I want is to prevent the same ID appear more than once in the table. In other words:
When the form has been submitted and the record has been created, I want Airtable to not delete, but make the user aware of the duplicate in the table.
Is the above mentioned possible with an Automation? One think I want to mention is that I can't create an Automation for each ID since we have more than 100.000 IDs (accounts) in the external software.
Mar 28, 2023 09:42 AM - edited Mar 28, 2023 09:45 AM
The best way to do this is usually with a script. There is an extension that does this: https://support.airtable.com/docs/dedupe-extension. There are also a lot of sample de-duping scripts and some youtube videos on this. (I do not know scripting, and this is one of the few scripts I have in our bases.)
In this case, though, since identifying duplicates is relatively straightforward (which it isn't always), I believe you should also be able to do this with an automation.
The trigger would be "When a form is submitted". Then, the next action would be Find Records based on the ID field of the newly submitted form.
From there, you would add a Conditional Action. If List of Record ID/ Name from Find Record step exists, send an email/slack/etc with links to both the new duplicate and previous record(s).
Mar 30, 2023 03:51 AM
Thanks a lot for your reply.
I've tried to create the Automation now, but for some reason it also sends me an email when there is no duplicate to be found.
My Automation looks like this (see picture).
The trigger is 'When a form is submitted'
1. Action is 'Find Records' Where ID (from the table) contains 'ID' from the form
2. Action (Conditional) is 'If Records List of 'ID' (from Find Records) contains ID (from the form).
Can you see what causes the issue?
Mar 31, 2023 10:30 AM
Try the condition: where List of Record IDs is not empty.