I have an automation that handles bulk uploaded PDF-files, with logic that extracts an ID-number and date from the filename. It then copies the attachment to a record with matching ID in another table. It also checks a checkbox on the original record of the uploaded PDF to mark it as complete and avoid multiple runs.
The automation runs fine, with just one weird "bug": The filename of the copied attachment changes to a random string "XxxxXxxxXXXx". However, if I now delete the copied attachment and go back to the uploaded file record and uncheck the "completed" checkbox to trigger the automation again, the file is copied with its original filename kept!
I suspect the reason is related to the automation starting to work before the file has been fully processed by Airtable, and some kind of temporary name is used. But this is also contradicted by the fact that the automation relies on data from the filename to be extracted before it can run...
My first idea was to add a delay to the automation, but there doesn't seem to be a way to add a short delay (less than 1min) without external services or "hacky" scripts, which I'd like to avoid...
Would love to hear some of your thoughts on this, maybe someone has encountered something similar?